/* PDF Signature Tool - Complete Responsive Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f9f9f9;
    margin: 0;
    padding: 0;
}

.pdf-signature-wrapper {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.upload-section,
.email-section,
.action-buttons {
    margin-bottom: 20px;
    text-align: center;
}

.upload-label {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: white;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 10px;
}

.pdf-upload-input {
    display: none;
}

.email-input {
    width: 80%;
    max-width: 400px;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.action-btn {
    display: inline-block;
    margin: 0 10px;
    padding: 10px 16px;
    font-size: 16px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.action-btn:hover {
    background-color: #005f8d;
}

.status-message {
    text-align: center;
    font-size: 16px;
    margin-bottom: 20px;
}

.status-message.success {
    color: green;
}

.status-message.error {
    color: red;
}

.status-message.info {
    color: #333;
}

/* PDF Container */
#pdf-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Each Page */
.pdf-page-wrapper {
    border: 1px solid #ddd;
    padding: 15px;
    background-color: white;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.pdf-background-canvas,
.signature-overlay-canvas {
    width: 100% !important;
    height: auto !important;
    display: block;
    max-width: 100%;
    touch-action: none; /* Prevent zoom/scroll on draw */
}

.canvas-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    display: inline-block;
}

@media (max-width: 768px) {
    .canvas-container {
        width: 100% !important;
    }
}

/* Control Buttons */
.button-group {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.control-btn {
    padding: 8px 14px;
    font-size: 14px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.control-btn:hover {
    background-color: #555;
}

.control-btn.active {
    background-color: #0073aa;
}

.control-btn.saved {
    background-color: green;
}

.page-label {
    font-weight: bold;
    margin-bottom: 10px;
    color: #0073aa;
}

/* File Info */
.file-info {
    font-size: 14px;
    margin-top: 10px;
    color: #555;
}

/* Responsive Touch Fix */
@media (max-width: 768px) {
    .canvas-container {
        width: 100% !important;
    }
    .email-input {
        width: 95%;
    }
    .action-btn {
        width: 90%;
        margin-bottom: 10px;
    }
    .button-group {
        flex-direction: column;
    }
}
