
/* Base SweetAlert2 Responsive Styles */
.swal2-popup { 
    width: 95vw !important; 
    max-width: 1500px !important; 
    height: 95vh !important; 
    border-radius: 20px !important; 
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .swal2-popup { 
        width: 98vw !important; 
        height: 98vh !important; 
        border-radius: 10px !important;
        margin: 0 !important;
    }
    
    .swal2-title { 
        font-size: 1.2rem !important; 
        margin-bottom: 10px !important;
    }
    
    .swal2-html-container {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .swal2-actions {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .swal2-confirm, .swal2-cancel {
        width: 100% !important;
        margin: 0 !important;
    }
}

.swal2-title { 
    color: #2c3e50 !important; 
    font-size: 1.8rem !important; 
    font-weight: 700 !important; 
}

/* Responsive Container Layout */
.responsive-container {
    display: flex;
    height: 90vh;
}

@media (max-width: 768px) {
    .responsive-container {
        flex-direction: column;
        height: auto;
    }
}

.pdf-section {
    flex: 2;
    border-right: 2px solid #e2e8f0;
}

@media (max-width: 768px) {
    .pdf-section {
        flex: none;
        border-right: none;
        border-bottom: 2px solid #e2e8f0;
        height: 50vh;
    }
}

.signature-section {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .signature-section {
        flex: none;
        padding: 15px;
        height: auto;
        max-height: 45vh;
    }
}

/* PDF Viewer Components */
.pdf-viewer-container { 
    width: 100%; 
    height: 100%; 
    display: flex; 
    flex-direction: column; 
    background: #f8f9fa; 
    border-radius: 15px; 
    overflow: hidden; 
}

.pdf-navigation { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 20px; 
    background: white; 
    border-bottom: 2px solid #e2e8f0; 
}

@media (max-width: 768px) {
    .pdf-navigation {
        padding: 10px;
        gap: 10px;
        flex-wrap: wrap;
    }
}

.nav-button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white; 
    border: none; 
    padding: 12px 24px; 
    border-radius: 25px;
    cursor: pointer; 
    font-weight: 600; 
    font-size: 14px; 
    transition: all 0.3s ease;
    display: flex; 
    align-items: center; 
    gap: 8px; 
    min-width: 120px; 
    justify-content: center;
}

@media (max-width: 768px) {
    .nav-button {
        padding: 8px 16px;
        font-size: 12px;
        min-width: 80px;
        gap: 4px;
    }
    
    .nav-button span {
        display: none;
    }
}

.nav-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.nav-button:disabled { 
    background: #cbd5e0; 
    cursor: not-allowed; 
}

.page-indicator { 
    font-weight: 600; 
    font-size: 16px; 
    color: #2d3748; 
    background: #edf2f7; 
    padding: 10px 20px; 
    border-radius: 20px; 
    border: 2px solid #e2e8f0; 
}

@media (max-width: 768px) {
    .page-indicator {
        font-size: 12px;
        padding: 8px 12px;
        flex: 1;
        text-align: center;
    }
}

.pdf-display-area { 
    position: relative; 
    flex: 1; 
    background: #ecf0f1; 
    display: flex; 
    justify-content: center; 
    align-items: flex-start; 
    padding: 20px; 
    overflow-y: auto; 
    overflow-x: hidden; 
}

@media (max-width: 768px) {
    /* .pdf-display-area {
        padding: 10px;
    } */
}

#pdf-canvas { 
    width: 100%; 
    max-width: 100%; 
    height: auto; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); 
    border-radius: 10px; 
    background: white; 
    display: block; 
}

/* Signature Form Components */
.signature-form { 
    text-align: left; 
    max-width: 600px; 
    margin: 0 auto; 
}

.form-section { 
    margin-bottom: 35px; 
    padding: 25px; 
    background: #f8f9fa; 
    border-radius: 15px; 
    border: 2px solid #e9ecef; 
}

@media (max-width: 768px) {
    .form-section {
        margin-bottom: 20px;
        padding: 15px;
        border-radius: 10px;
    }
}

.section-title { 
    font-size: 1.2rem; 
    font-weight: 700; 
    color: #2c3e50; 
    margin-bottom: 20px; 
    display: flex; 
    align-items: center; 
}

@media (max-width: 768px) {
    .section-title {
        font-size: 1rem;
        margin-bottom: 15px;
    }
}

.section-title i { 
    margin-right: 10px; 
    color: #667eea; 
}

.radio-group { 
    display: flex; 
    gap: 20px; 
    justify-content: center; 
    flex-wrap: wrap; 
}

@media (max-width: 768px) {
    .radio-group {
        gap: 10px;
        flex-direction: column;
    }
}

.radio-option {
    display: flex; 
    align-items: center; 
    padding: 15px 25px; 
    border: 2px solid #e2e8f0;
    border-radius: 12px; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    background: white;
    min-width: 140px; 
    justify-content: center;
}

@media (max-width: 768px) {
    .radio-option {
        padding: 12px 20px;
        min-width: auto;
        width: 100%;
        justify-content: flex-start;
        touch-action: manipulation;
    }
}

.radio-option:hover { 
    border-color: #667eea; 
    background: #f7fafc; 
    transform: translateY(-2px); 
}

.radio-option input[type="radio"] { 
    margin-right: 10px; 
    transform: scale(1.2); 
    accent-color: #667eea; 
}

.radio-option.selected { 
    border-color: #667eea; 
    background: linear-gradient(135deg, #667eea, #764ba2); 
    color: white; 
}

.input-group { 
    margin: 25px 0; 
}

@media (max-width: 768px) {
    .input-group {
        margin: 15px 0;
    }
}

.input-group label { 
    display: block; 
    margin-bottom: 10px; 
    font-weight: 600; 
    color: #2d3748; 
    font-size: 1rem; 
}

@media (max-width: 768px) {
    .input-group label {
        font-size: 0.9rem;
    }
}

.input-group input[type="file"], .input-group input[type="url"] {
    width: 100%; 
    padding: 15px; 
    border: 2px solid #e2e8f0; 
    border-radius: 10px;
    font-size: 16px; 
    transition: border-color 0.3s ease; 
    background: white;
}

@media (max-width: 768px) {
    .input-group input[type="file"], .input-group input[type="url"] {
        padding: 12px;
        font-size: 14px;
    }
}

.input-group input:focus { 
    outline: none; 
    border-color: #667eea; 
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); 
}

.preview-area { 
    text-align: center; 
    margin: 25px 0; 
    padding: 20px; 
    background: white; 
    border-radius: 12px; 
    border: 2px dashed #e2e8f0; 
}

@media (max-width: 768px) {
    .preview-area {
        margin: 15px 0;
        padding: 15px;
    }
}

.preview-area img { 
    max-width: 250px; 
    max-height: 200px; 
    border-radius: 10px; 
    box-shadow: 0 8px 20px rgba(0,0,0,0.1); 
}

@media (max-width: 768px) {
    .preview-area img {
        max-width: 150px;
        max-height: 120px;
    }
}

/* Signature Element Styles */
.signature-element {
    position: absolute; 
    border: 2px solid #667eea; 
    background: rgba(102, 126, 234, 0.1);
    cursor: move; 
    min-width: 80px; 
    min-height: 60px; 
    z-index: 1001; 
    border-radius: 8px;
}

@media (max-width: 768px) {
    .signature-element {
        min-width: 60px;
        min-height: 45px;
    }
}

.signature-element:hover { 
    border-color: #5a67d8; 
    background: rgba(102, 126, 234, 0.15); 
}

.signature-element img { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; 
    pointer-events: none; 
    border-radius: 6px; 
}

.resize-corner {
    position: absolute; 
    bottom: -5px; 
    right: -5px; 
    width: 24px; 
    height: 24px;
    background: #667eea; 
    cursor: nw-resize; 
    border-radius: 50%; 
    border: 3px solid white;
}

@media (max-width: 768px) {
    .resize-corner {
        width: 20px;
        height: 20px;
        border: 2px solid white;
    }
}

/* Button Styles */
.swal2-confirm { 
    background: linear-gradient(135deg, #667eea, #764ba2) !important; 
    border: none !important; 
    border-radius: 25px !important; 
    padding: 12px 30px !important; 
    font-weight: 600 !important; 
}

@media (max-width: 768px) {
    .swal2-confirm {
        padding: 10px 20px !important;
        font-size: 14px !important;
    }
}

.swal2-cancel { 
    background: #e2e8f0 !important; 
    color: #4a5568 !important; 
    border: none !important; 
    border-radius: 25px !important; 
    padding: 12px 30px !important; 
    font-weight: 600 !important; 
}

@media (max-width: 768px) {
    .swal2-cancel {
        padding: 10px 20px !important;
        font-size: 14px !important;
    }
}

/* Loading Animation */
.loading { 
    display: inline-block; 
    width: 20px; 
    height: 20px; 
    border: 3px solid #f3f3f3; 
    border-top: 3px solid #667eea; 
    border-radius: 50%; 
    animation: spin 1s linear infinite; 
    margin-right: 10px; 
}

@keyframes spin { 
    0% { transform: rotate(0deg); } 
    100% { transform: rotate(360deg); } 
}


/* put in your main CSS file or a <style> tag */
.swal-sm-popup {
width: 320px !important;      /* desired width */
height: 360px !important;      /* desired width */
min-width: 0 !important;      /* override SweetAlert2 default */
padding: 10px !important;
box-sizing: border-box !important;
}
.swal-sm-popup .swal2-title { font-size: 14px; margin-bottom: 6px; }
.swal-sm-popup .swal2-content { font-size: 12px; }