/* ================================================================
   csp-styles.css
   CSP-Compliant Utility Classes — replaces all inline style= attrs
   ================================================================ */

/* ── Icon sizes (Material Icons) ────────────────────────────── */
.icon-1-2rem  { font-size: 1.2rem; }
.icon-close   { font-size: 14px; vertical-align: middle; }
.icon-copy    { font-size: 14px; }
.icon-18px    { font-size: 18px; }
.icon-20px    { font-size: 20px; }
.icon-2rem    { font-size: 2rem; }
.icon-2-5rem  { font-size: 2.5rem; }
.icon-3rem    { font-size: 3rem; }
.icon-info    { font-size: 0.9rem; vertical-align: middle; }

/* ── Text / button font sizes ────────────────────────────────── */
.fs-btn       { font-size: 0.85rem; }
.fs-btn-lh    { font-size: 0.85rem; line-height: 1.2; }
.fs-btn-xs    { font-size: 0.8rem; }
.fs-xs        { font-size: 0.75rem; }
.fs-sm        { font-size: 0.9rem; }

/* Section header title (replaces style="color:#1e293b; font-size:1rem;") */
.section-header-title { color: #1e293b; font-size: 1rem; }

/* ── Form input / control sizes ──────────────────────────────── */
.input-h30 {
    height: 30px !important;
    min-height: 30px !important;
    padding: 0.15rem 0.5rem !important;
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
}

/* Robust styling for small file inputs to ensure they are exactly 30px and align correctly */
.input-file-sm {
    height: 30px !important;
    padding: 0 0.5rem !important;
    line-height: 28px !important;
}

.input-file-sm::-webkit-file-upload-button {
    padding: 0 0.75rem !important;
    margin: 0 -0.5rem 0 -0.5rem !important;
    height: 28px !important;
    border: none !important;
    border-right: 1px solid #cbd5e1 !important;
    background-color: #f1f5f9 !important;
    color: #334155 !important;
    font-size: 0.8rem !important;
    cursor: pointer;
}

.input-file-sm::file-selector-button {
    padding: 0 0.75rem !important;
    margin: 0 -0.5rem 0 -0.5rem !important;
    height: 28px !important;
    border: none !important;
    border-right: 1px solid #cbd5e1 !important;
    background-color: #f1f5f9 !important;
    color: #334155 !important;
    font-size: 0.8rem !important;
    cursor: pointer;
}

/* Robust styling for verify file inputs to ensure they are exactly 35px */
.input-file-verify {
    height: 35px !important;
    padding: 0 0.75rem !important;
    line-height: 33px !important;
}

.input-file-verify::-webkit-file-upload-button {
    padding: 0 1rem !important;
    margin: 0 -0.75rem 0 -0.75rem !important;
    height: 33px !important;
    border: none !important;
    border-right: 1px solid #cbd5e1 !important;
    background-color: #f1f5f9 !important;
    color: #334155 !important;
    font-size: 0.85rem !important;
    cursor: pointer;
}

.input-file-verify::file-selector-button {
    padding: 0 1rem !important;
    margin: 0 -0.75rem 0 -0.75rem !important;
    height: 33px !important;
    border: none !important;
    border-right: 1px solid #cbd5e1 !important;
    background-color: #f1f5f9 !important;
    color: #334155 !important;
    font-size: 0.85rem !important;
    cursor: pointer;
}
.no-resize       { resize: none; }
.btn-init-batch  { height: 30px; font-size: 0.8rem; padding: 0 0.75rem; }

/* ── Textarea variants used in Verify pages ──────────────────── */
.verify-textarea {
    height: 100px;
    resize: vertical;
    color: #000000 !important;
    background-color: #ffffff !important;
    padding: 0.75rem !important;
    line-height: 1.5;
}
.verify-xml-textarea {
    height: 150px;
    resize: vertical;
    color: #000000 !important;
    background-color: #ffffff !important;
    padding: 0.75rem !important;
    line-height: 1.5;
}
.verify-result-textarea {
    resize: none;
    color: #000000 !important;
    background-color: #f8f9fa !important;
    padding: 0.75rem !important;
    line-height: 1.5;
}

/* ── RegisterDSC specific ────────────────────────────────────── */
.loading-overlay {
    position: absolute;
    top: 0; bottom: 0; left: 0; right: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.spinner-custom { width: 2rem; height: 2rem; }
.cert-area-min-h { min-height: 120px; }
.btn-copy-sm { font-size: 0.75rem; padding: 0.15rem 0.6rem; border-radius: 4px; transition: all 0.2s; }

/* ── SignPdfNoStampingV5 radio group ─────────────────────────── */
.radio-group-style {
    height: 30px;
    padding: 0 0.5rem;
    border-color: transparent !important;
    background-color: transparent !important;
}
.radio-label-text { font-size: 0.85rem; }

/* ── TSA info text (NoStamping templates) ────────────────────── */
.tsa-info-text { font-size: 0.75rem; padding-bottom: 5px; }

/* ── Nicdsign-download specific ──────────────────────────────── */
.navbar-dl-shadow { box-shadow: 0 2px 4px rgba(0,0,0,0.02); z-index: 1050; }
.dashboard-bg     { gap: 15px; background-color: #f4f6f9; }
.right-side-gap   { gap: 15px; }
.sidebar-toggle-btn { width: 32px; height: 32px; }
.sidebar-label-text { font-size: 0.75rem; letter-spacing: 1px; }
.card-desc-text   { font-size: 0.9rem; }
.help-h6-text     { font-size: 0.85rem; }
.help-p-text      { font-size: 0.75rem; }
.releases-title   { color: #2c3e50; font-size: 1.8rem; letter-spacing: -0.5px; }

/* ── Visually hidden (replaces style="display:none;" on static hidden elements) */
/* Use Bootstrap .d-none for elements shown/hidden by JS with classList toggle  */
/* Use .csp-hidden for elements toggled by JS via element.style.display          */
.csp-hidden { display: none; }

/* ── formContainer card style (replaces inline style on #formContainer) ──── */
.form-view-container {
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    padding: 0;
}

/* ── Material icon helpers for authenticate/error pages ──────────────────── */
.icon-va-mid           { vertical-align: middle; }
.icon-va-mid-mr5-16px  { vertical-align: middle; margin-right: 5px; font-size: 16px; }
.icon-va-mid-mr8       { vertical-align: middle; margin-right: 8px; }
.icon-inherit          { font-size: inherit; }


/* ================================================================
   Authenticate & Error Pages Styles (moved from inline <style>)
   ================================================================ */

/* Body styles for authenticate/mailauthenticate/error pages */
body.auth-page {
    font-family: 'Lato', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 450px;
    width: 100%;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
}

.auth-title {
    color: #333;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.auth-subtitle {
    color: #666;
    font-size: 14px;
}

.auth-container .form-group {
    margin-bottom: 20px;
}

.auth-container .form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

.auth-container .form-control {
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.auth-container .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-download {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    padding: 12px 24px;
    width: 100%;
    transition: all 0.3s ease;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    color: white;
}

.alert-info {
    background-color: #e7f3ff;
    border-color: #b3d9ff;
    color: #004085;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.btn-home {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    padding: 12px 24px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    color: white;
    text-decoration: none;
}

.error-icon {
    font-size: 64px;
    color: #dc3545;
    margin-bottom: 20px;
}

.success-icon {
    font-size: 64px;
    color: #28a745;
    margin-bottom: 20px;
}


.back-link {
    text-align: center;
    margin-top: 20px;
}

.back-link a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
}

.back-link a:hover {
    text-decoration: underline;
}


.mail-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.mail-info-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: 14px;
}

.mail-info-text {
    color: #666;
    font-size: 13px;
    margin: 0;
}


.error-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 450px;
    width: 100%;
    text-align: center;
}

.error-title {
    color: #333;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
}

.error-message {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.5;
}

/* ================================================================
   Admin Panel & Early Session Preloader Styles
   ================================================================ */
.admin-preload-active .navbar,
.admin-preload-active .hero-section,
.admin-preload-active #home,
.admin-preload-active #features,
.admin-preload-active #about,
.admin-preload-active #services,
.admin-preload-active #demo,
.admin-preload-active #download,
.admin-preload-active .counterbg,
.admin-preload-active .about-section-bg,
.admin-preload-active .btn-admin-footer,
.admin-preload-active footer,
.admin-preload-active .footer,
.admin-preload-active .footer-section {
    display: none !important;
}

.admin-preload-active body {
    background: white !important;
}

#admin-early-loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 9999;
}

.early-loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.early-loader-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e0e0e0;
    border-top-color: #0891b2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.early-loader-text {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

/* ── Content Refresh Spinner / Loading Styles ─────────────────── */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner .material-icons {
    font-size: 48px;
    animation: spin 1s linear infinite;
    color: #0891b2;
}

.content-refresh-loader {
    text-align: center;
    padding: 40px 20px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.content-refresh-loader .material-icons {
    font-size: 48px;
    animation: spin 1s linear infinite;
    color: #0891b2;
    margin-bottom: 10px;
}

.content-refresh-loader p {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

/* ── Form Date Inline Style ─────────────────── */
.fromdate-inline-style {
    background-color: #f8f9fa !important;
    cursor: not-allowed !important;
    color: #495057 !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
}

/* ── Modal Custom Styles (CSP Compliant) ─────────────────── */
.modal-desc-p {
    font-size: 14px !important;
    line-height: 1.5 !important;
}

.text-info-custom {
    color: #17a2b8 !important;
}

.modal-body-height-80vh {
    height: 80vh !important;
}

.pdf-loading-container-style {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    background: #f8f9fa;
}

.pdf-iframe-style {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
}

.pdf-error-container-style {
    padding: 40px !important;
    text-align: center !important;
    background: #f8f9fa !important;
}

.icon-48px {
    font-size: 48px !important;
}

/* Close button positioning for certificate modal to comply with style-src 'self' */
.close-btn-fixed {
    position: fixed !important;
    z-index: 99 !important;
    right: 20px !important;
    top: 20px !important;
}

.style-width-60 {
    width: 60% !important;
}
.text-left-align {
    text-align: left !important;
}
.col-width-100 {
    width: 100px !important;
}
.fs-xs-monospace {
    font-size: 0.75rem !important;
    font-family: monospace !important;
}
.fs-xs-borderless {
    font-size: 0.75rem !important;
    background: transparent !important;
    border: none !important;
}

