/* ===================================================================
   doc-sign-modal.css — Sign document modal styling
   Extracted from inline <style> in _sign_doc_modal.html
   Design system: #12294B / #3657CD / border-radius 16px
   =================================================================== */

[hidden] {
    display: none !important;
}

/* === Modal container === */
.sign-modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 8px 40px rgba(0,0,0,0.15);
    overflow: hidden;
    position: relative;
}

.sign-modal-body {
    padding: 40px 32px 20px;
}

.sign-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #333;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    padding: 4px 8px;
}
.sign-modal-close:hover {
    color: #000;
}

/* === Title === */
.sign-modal-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin: 8px 0 24px;
    color: #12294B;
}

/* === Checkboxes === */
.sign-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 20px;
    margin-bottom: 16px;
    background: #f5f7fb;
    border: 1.5px solid #d0d7e5;
    border-radius: 12px;
}
.sign-checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.sign-checkbox-item label {
    font-size: 0.95rem;
    line-height: 1.55;
    color: #111827;
    cursor: pointer;
}
.sign-checkbox-item .form-check-input {
    width: 22px;
    height: 22px;
    min-width: 22px;
    margin-top: 2px;
    border: 2px solid #9ca3af;
    border-radius: 5px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-color: #fff;
    transition: all 0.15s ease;
}
.sign-checkbox-item .form-check-input:checked {
    background-color: #12294B;
    border-color: #12294B;
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
    background-size: 14px;
    background-repeat: no-repeat;
    background-position: center;
}
.sign-checkbox-item .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(18, 41, 75, 0.15);
    border-color: #12294B;
}

/* === Primary button === */
.sign-modal-btn {
    display: block;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.sign-modal-btn-primary {
    background: linear-gradient(135deg, #3657CD 0%, #12294B 100%);
    color: #fff;
}
.sign-modal-btn-primary:hover:not(:disabled) {
    box-shadow: 0 4px 16px rgba(54, 87, 205, 0.3);
}
.sign-modal-btn-primary:disabled {
    background: #9dafc8;
    color: rgba(255,255,255,0.85);
    cursor: not-allowed;
}

/* === OTP Section === */
.sign-otp-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.sign-otp-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: #1f2937;
    text-align: center;
    margin-bottom: 8px;
    line-height: 1.5;
}

.sign-otp-cells {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 4px 0 12px;
}

.sign-otp-cell {
    width: 72px;
    height: 76px;
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    color: #111827;
    border: 2px solid #e0e6ee;
    border-radius: 16px;
    outline: none;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
}
.sign-otp-cell:focus {
    border-color: #3657CD;
    box-shadow: 0 0 0 3px rgba(54, 87, 205, 0.12);
}
.sign-otp-cell.filled {
    border-color: #3657CD;
    background: #f0f4ff;
}
.sign-otp-cell.error {
    border-color: #d32f2f;
    background: #fef2f2;
}
.sign-otp-cell.success {
    border-color: #16a34a;
    background: #f0fdf4;
}

.sign-otp-success {
    color: #16a34a;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    padding: 6px 12px;
    background: #f0fdf4;
    border-radius: 8px;
    width: 100%;
    animation: sign-fade-in 0.3s ease;
}

.sign-otp-hint {
    font-size: 0.9rem;
    color: #374151;
    text-align: center;
    margin-bottom: 4px;
}

.sign-otp-error {
    color: #d32f2f;
    font-size: 0.9rem;
    text-align: center;
    padding: 6px 12px;
    background: #fef2f2;
    border-radius: 8px;
    width: 100%;
}

.sign-status {
    color: #888;
    font-size: 0.9em;
    text-align: center;
    opacity: 0;
    animation: sign-breathing 1.8s ease-in-out infinite;
}
@keyframes sign-breathing {
    0% { opacity: 0.3; }
    50% { opacity: 0.9; }
    100% { opacity: 0.3; }
}

/* === Resend code block === */
.sign-resend-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    width: 100%;
}

.sign-countdown {
    font-size: 0.85rem;
    color: #4b5563;
    text-align: center;
}

.sign-resend-notice {
    color: #2e7d32;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    padding: 4px 0;
    animation: sign-fade-in 0.3s ease;
}
@keyframes sign-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.sign-resend-btn {
    background: none;
    border: none;
    color: #3657CD;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 0;
    transition: opacity 0.2s;
}
.sign-resend-btn:hover:not(:disabled) {
    text-decoration: underline;
}
.sign-resend-btn:disabled {
    color: #6b7280;
    cursor: not-allowed;
}

/* === Footer bar === */
.sign-modal-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    border-top: 1px solid #e0e6ee;
    padding: 14px 24px;
    background: #f8f9fb;
    border-radius: 0 0 20px 20px;
}

.sign-footer-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    color: #374151;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: color 0.2s;
}
.sign-footer-action:hover {
    color: #3657CD;
}

.sign-footer-svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sign-footer-divider {
    width: 1px;
    height: 22px;
    background: #e0e6ee;
    flex-shrink: 0;
}

/* === Voice Call block === */
.sign-voice-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    width: 100%;
}

.sign-voice-divider {
    width: 100%;
    height: 1px;
    background: #e0e6ee;
    margin: 4px 0;
}

.sign-voice-label {
    font-size: 0.85rem;
    color: #4b5563;
    font-weight: 500;
    text-align: center;
}

.sign-voice-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1.5px solid #3657CD;
    color: #3657CD;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 10px;
    transition: all 0.2s;
}
.sign-voice-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #3657CD 0%, #12294B 100%);
    color: #fff;
    border-color: #3657CD;
}
.sign-voice-btn:hover:not(:disabled) .sign-voice-icon {
    stroke: #fff;
}
.sign-voice-btn:disabled {
    border-color: #9aa5b4;
    color: #9aa5b4;
    cursor: not-allowed;
}

.sign-voice-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.sign-voice-hint {
    font-size: 0.85rem;
    color: #1f2937;
    text-align: center;
    background: #f0f4ff;
    border-radius: 8px;
    padding: 8px 12px;
    line-height: 1.5;
}

/* === Waitcall === */
.sign-waitcall-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    width: 100%;
}

.sign-waitcall-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1.5px solid #d97706;
    color: #d97706;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 10px;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.sign-waitcall-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #d97706 0%, #92400e 100%);
    color: #fff;
    border-color: #d97706;
}
.sign-waitcall-btn:hover:not(:disabled) .sign-voice-icon {
    stroke: #fff;
}
.sign-waitcall-btn:disabled {
    border-color: #9aa5b4;
    color: #9aa5b4;
    cursor: not-allowed;
}
.sign-waitcall-phone {
    background: #fffbeb;
    border: 2px solid #d97706;
    border-radius: 10px;
    padding: 12px 20px;
    text-align: center;
    width: 100%;
}
.sign-waitcall-phone a {
    font-size: 1.35rem;
    font-weight: 700;
    color: #92400e;
    text-decoration: none;
    letter-spacing: 0.5px;
}
.sign-waitcall-phone a:hover {
    color: #d97706;
    text-decoration: underline;
}

/* === Responsive === */
@media (max-width: 480px) {
    .sign-modal-body {
        padding: 24px 16px 12px;
    }
    .sign-modal-title {
        font-size: 1.4rem;
    }
    .sign-otp-cell {
        width: 52px;
        height: 60px;
        font-size: 1.6rem;
        border-radius: 10px;
    }
    .sign-otp-cells {
        gap: 10px;
    }
    .sign-otp-hint {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }
    .sign-modal-footer {
        flex-direction: column;
        gap: 0;
        padding: 10px 16px;
    }
    .sign-footer-divider {
        width: 80%;
        height: 1px;
        margin: 0;
    }
    .sign-footer-action {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

/* === Autosign modal === */
.autosign-modal .modal-content {
    border-radius: 20px;
    padding: 32px;
    border: none;
    box-shadow: 0 8px 40px rgba(18, 41, 75, 0.15);
}

.autosign-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.autosign-modal-icon {
    width: 40px;
    height: 40px;
    background: #f0f4ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.autosign-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #12294B;
    margin: 0;
}

.autosign-modal-subtitle {
    font-size: 13px;
    color: #9aa5b4;
    margin: 0;
}

/* === Autosign table === */
.autosign-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.autosign-table th {
    padding: 10px 14px;
    background: #f5f7fa;
    font-weight: 600;
    color: #12294B;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px solid #e0e6ee;
    text-align: left;
}

.autosign-table th:first-child {
    border-radius: 10px 0 0 0;
}

.autosign-table th:last-child {
    border-radius: 0 10px 0 0;
    text-align: center;
    width: 120px;
}

.autosign-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f0f2f7;
    color: #3a4a5e;
}

.autosign-table td:last-child {
    text-align: center;
}
