/* 
 * Aviation SMS Engine - Professional FAA Compliance Interface
 * Version: 2.1 - Fixed Color Contrast for WordPress Compatibility
 * Color Scheme: Aviation Blue (#1a237e) + Safety Green (#2e7d32)
 */
/* Add this to sms-engine.css - at the VERY TOP */
:root .sms-document-generator ::placeholder { color: #999999 !important; }

/* ===== RESET & BASE STYLES ===== */
:root {
    --aviation-blue: #1a237e;
    --aviation-blue-light: #283593;
    --aviation-blue-lighter: #3949ab;
    --safety-green: #2e7d32;
    --safety-green-light: #4caf50;
    --warning-orange: #ff9800;
    --danger-red: #d32f2f;
    --neutral-gray: #f5f5f5;
    --neutral-gray-dark: #757575;
    --text-primary: #212121;
    --text-secondary: #616161;
    --white: #ffffff;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.2);
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* IMPORTANT: Reset WordPress theme interference */
.sms-login-container,
.sms-already-logged-in,
.sms-document-generator,
.sms-wizard-container,
.wizard-intro,
.sms-dashboard {
    /* Reset any WordPress theme styles */
    all: initial;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

.sms-login-container *,
.sms-already-logged-in *,
.sms-document-generator *,
.sms-wizard-container *,
.wizard-intro *,
.sms-dashboard * {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    box-sizing: border-box;
}

/* Force white text on dark backgrounds */
.login-header,
.generator-header,
.wizard-header,
.dashboard-header,
.intro-header {
    color: var(--white) !important;
}

.login-header h2,
.login-header p,
.generator-header h1,
.generator-header .company-info,
.wizard-header h1,
.wizard-header p,
.dashboard-header h1,
.dashboard-header p,
.intro-header h1,
.intro-header p {
    color: var(--white) !important;
}

/* Force dark text on light backgrounds */
.sms-login-form input,
.sms-login-form textarea,
.sms-login-form select,
.form-question input,
.form-question textarea,
.form-question select,
.document-content,
.document-content pre {
    color: var(--text-primary) !important;
    background-color: var(--white) !important;
}

/* Force input placeholder color */
.sms-login-form input::placeholder,
.form-question input::placeholder,
.form-question textarea::placeholder {
    color: #999 !important;
    opacity: 1 !important;
}

/* ===== LOGIN PAGE STYLES ===== */
.sms-login-container {
    max-width: 420px;
    margin: 80px auto !important;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-heavy);
    overflow: hidden;
    border: 1px solid rgba(26, 35, 126, 0.1);
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    background: linear-gradient(135deg, var(--aviation-blue) 0%, var(--aviation-blue-light) 100%);
    color: var(--white) !important;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
    from {
        transform: translate(0, 0);
    }
    to {
        transform: translate(30px, 30px);
    }
}

.login-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    color: var(--white) !important;
}

.login-header p {
    font-size: 16px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    color: var(--white) !important;
}

.login-header .aviation-icon {
    display: block;
    font-size: 48px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
    color: var(--white) !important;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.sms-login-form {
    padding: 40px;
}

.form-group {
    margin-bottom: 28px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--aviation-blue) !important;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* FIX: Input text color - force dark on light */
.sms-login-form input[type="text"],
.sms-login-form input[type="password"] {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    background: var(--white) !important;
    transition: var(--transition);
    color: var(--text-primary) !important;
    -webkit-text-fill-color: var(--text-primary) !important;
}

/* Fix for autofill background */
.sms-login-form input:-webkit-autofill,
.sms-login-form input:-webkit-autofill:hover,
.sms-login-form input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-primary) !important;
    -webkit-box-shadow: 0 0 0px 1000px var(--white) inset !important;
    box-shadow: 0 0 0px 1000px var(--white) inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

.sms-login-form input:focus {
    outline: none;
    border-color: var(--aviation-blue-light);
    box-shadow: 0 0 0 3px rgba(40, 53, 147, 0.1);
    background: var(--white) !important;
    color: var(--text-primary) !important;
}

.sms-login-form input::placeholder {
    color: #999 !important;
    opacity: 1 !important;
}

.btn-login {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--safety-green) 0%, var(--safety-green-light) 100%);
    color: var(--white) !important;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.login-footer {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--warning-orange);
}

.login-footer p {
    font-size: 14px;
    color: var(--text-secondary) !important;
    text-align: center;
}

.login-footer code {
    background: var(--white);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: var(--aviation-blue);
    font-weight: 600;
}

.login-message {
    margin-top: 20px;
    padding: 16px;
    border-radius: var(--border-radius);
    font-size: 14px;
    text-align: center;
    animation: fadeIn 0.3s ease-out;
    color: inherit !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-message.success {
    background: #e8f5e9;
    color: var(--safety-green) !important;
    border: 1px solid #c8e6c9;
}

.login-message.error {
    background: #ffebee;
    color: var(--danger-red) !important;
    border: 1px solid #ffcdd2;
}

/* Already Logged In State */
.sms-already-logged-in {
    max-width: 500px;
    margin: 80px auto !important;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-heavy);
    padding: 40px;
    text-align: center;
    animation: slideUp 0.6s ease-out;
}

.sms-already-logged-in h2 {
    color: var(--aviation-blue) !important;
    margin-bottom: 20px;
    font-size: 28px;
}

.sms-already-logged-in p {
    color: var(--text-secondary) !important;
    margin-bottom: 30px;
    font-size: 16px;
}

.logged-in-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 28px;
    border-radius: var(--border-radius);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--aviation-blue) 0%, var(--aviation-blue-light) 100%);
    color: var(--white) !important;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 35, 126, 0.3);
}

.btn-secondary {
    background: var(--white);
    color: var(--aviation-blue) !important;
    border-color: var(--aviation-blue);
}

.btn-secondary:hover {
    background: var(--aviation-blue);
    color: var(--white) !important;
    transform: translateY(-2px);
}

.btn-logout {
    background: var(--white);
    color: var(--danger-red) !important;
    border-color: var(--danger-red);
}

.btn-logout:hover {
    background: var(--danger-red);
    color: var(--white) !important;
    transform: translateY(-2px);
}

/* ===== DOCUMENT GENERATOR STYLES ===== */
.sms-document-generator {
    max-width: 1200px;
    margin: 40px auto !important;
    padding: 0 20px;
    color: var(--text-primary) !important;
}

/* Navigation */
.sms-navigation {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-light);
    display: flex;
    gap: 15px;
    align-items: center;
    border: 1px solid rgba(26, 35, 126, 0.1);
}

.nav-link {
    padding: 10px 20px;
    text-decoration: none;
    color: var(--text-secondary) !important;
    border-radius: 6px;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    background: rgba(26, 35, 126, 0.05);
    color: var(--aviation-blue) !important;
}

.nav-link.active {
    background: var(--aviation-blue);
    color: var(--white) !important;
}

.nav-link.logout {
    margin-left: auto;
    background: rgba(211, 47, 47, 0.1);
    color: var(--danger-red) !important;
}

.nav-link.logout:hover {
    background: var(--danger-red);
    color: var(--white) !important;
}

/* Generator Header */
.generator-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px;
    background: linear-gradient(135deg, var(--aviation-blue) 0%, var(--aviation-blue-light) 100%);
    color: var(--white) !important;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-medium);
}

.generator-header h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--white) !important;
}

.company-info {
    font-size: 18px;
    opacity: 0.9;
    color: var(--white) !important;
}

/* Document Selection */
.document-selection {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-light);
    margin-bottom: 30px;
    color: var(--text-primary) !important;
}

.document-selection h2 {
    color: var(--aviation-blue) !important;
    margin-bottom: 20px;
    font-size: 28px;
    text-align: center;
}

.document-selection > p {
    color: var(--text-secondary) !important;
    text-align: center;
    margin-bottom: 40px;
    font-size: 16px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.document-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.doc-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    border: 2px solid #e0e0e0;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    color: var(--text-primary) !important;
}

.doc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--aviation-blue), var(--safety-green));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.doc-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--aviation-blue-light);
}

.doc-card:hover::before {
    transform: scaleX(1);
}

.doc-icon {
    font-size: 40px;
    margin-bottom: 20px;
    color: var(--aviation-blue) !important;
}

.doc-card h3 {
    color: var(--aviation-blue) !important;
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 600;
}

.doc-card p {
    color: var(--text-secondary) !important;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.btn-select-doc {
    width: 100%;
    padding: 12px;
    background: var(--aviation-blue);
    color: var(--white) !important;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-select-doc:hover {
    background: var(--aviation-blue-light);
    transform: translateY(-2px);
}

/* Question Form Container */
.question-form-container {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-light);
    margin-bottom: 30px;
    animation: fadeIn 0.5s ease-out;
    color: var(--text-primary) !important;
}

#formTitle {
    color: var(--aviation-blue) !important;
    margin-bottom: 10px;
    font-size: 24px;
    text-align: center;
}

.form-description {
    color: var(--text-secondary) !important;
    text-align: center;
    margin-bottom: 40px;
    font-size: 16px;
}

.questions-container {
    display: grid;
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.form-question {
    animation: slideIn 0.4s ease-out;
    animation-fill-mode: both;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-question label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--aviation-blue) !important;
    margin-bottom: 10px;
}

/* FIX: Form input colors */
.form-question input[type="text"],
.form-question textarea,
.form-question select {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    background: var(--white) !important;
    transition: var(--transition);
    color: var(--text-primary) !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    font-family: inherit;
}

/* Fix autofill for form questions */
.form-question input:-webkit-autofill,
.form-question input:-webkit-autofill:hover,
.form-question input:-webkit-autofill:focus,
.form-question textarea:-webkit-autofill,
.form-question textarea:-webkit-autofill:hover,
.form-question textarea:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-primary) !important;
    -webkit-box-shadow: 0 0 0px 1000px var(--white) inset !important;
    box-shadow: 0 0 0px 1000px var(--white) inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

.form-question input[type="text"]:focus,
.form-question textarea:focus,
.form-question select:focus {
    outline: none;
    border-color: var(--aviation-blue-light);
    box-shadow: 0 0 0 3px rgba(40, 53, 147, 0.1);
    background: var(--white) !important;
    color: var(--text-primary) !important;
}

.form-question textarea {
    min-height: 120px;
    resize: vertical;
}

.form-question select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%231a237e' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    padding-right: 50px;
}

.required {
    color: var(--danger-red) !important;
}

.help-text {
    display: block;
    margin-top: 8px;
    color: var(--neutral-gray-dark) !important;
    font-size: 13px;
    line-height: 1.4;
}

.faa-reference {
    display: block;
    margin-top: 6px;
    color: var(--safety-green) !important;
    font-size: 12px;
    font-weight: 500;
    font-style: italic;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.btn-back,
.btn-generate {
    padding: 16px 32px;
    border-radius: var(--border-radius);
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-back {
    background: var(--white);
    color: var(--text-secondary) !important;
    border: 2px solid #e0e0e0;
}

.btn-back:hover {
    background: #f5f5f5;
    color: var(--aviation-blue) !important;
    border-color: var(--aviation-blue-light);
}

.btn-generate {
    background: linear-gradient(135deg, var(--safety-green) 0%, var(--safety-green-light) 100%);
    color: var(--white) !important;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.3);
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 60px 40px;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    color: var(--text-primary) !important;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(26, 35, 126, 0.1);
    border-top-color: var(--aviation-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-state p {
    color: var(--text-secondary) !important;
    font-size: 16px;
    margin-bottom: 10px;
}

.loading-note {
    font-size: 14px;
    color: var(--neutral-gray-dark) !important;
}

/* Preview Container */
.preview-container {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-light);
    animation: fadeIn 0.5s ease-out;
    color: var(--text-primary) !important;
}

.preview-container h2 {
    color: var(--aviation-blue) !important;
    margin-bottom: 30px;
    font-size: 24px;
    text-align: center;
}

.preview-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.btn-download,
.btn-new-doc {
    padding: 16px 32px;
    border-radius: var(--border-radius);
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-download {
    background: linear-gradient(135deg, var(--aviation-blue) 0%, var(--aviation-blue-light) 100%);
    color: var(--white) !important;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 35, 126, 0.3);
}

.btn-new-doc {
    background: var(--white);
    color: var(--aviation-blue) !important;
    border: 2px solid var(--aviation-blue);
}

.btn-new-doc:hover {
    background: var(--aviation-blue);
    color: var(--white) !important;
    transform: translateY(-2px);
}

.document-preview {
    background: #fafafa;
    border-radius: var(--border-radius);
    padding: 40px;
    border: 1px solid #e0e0e0;
    max-height: 600px;
    overflow-y: auto;
    color: var(--text-primary) !important;
}

.document-content {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
    color: var(--text-primary) !important;
}

.document-content pre {
    margin: 0;
    font-family: inherit;
    color: var(--text-primary) !important;
}

/* SMS Message (Success/Error) */
.sms-message {
    padding: 16px 24px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    animation: slideDown 0.3s ease-out;
    position: relative;
    overflow: hidden;
    color: inherit !important;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sms-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.sms-message.success {
    background: #e8f5e9;
    color: var(--safety-green) !important;
    border: 1px solid #c8e6c9;
}

.sms-message.success::before {
    background: var(--safety-green);
}

.sms-message.error {
    background: #ffebee;
    color: var(--danger-red) !important;
    border: 1px solid #ffcdd2;
}

.sms-message.error::before {
    background: var(--danger-red);
}

/* ===== WIZARD & DASHBOARD FIXES ===== */
.wizard-intro {
    max-width: 1200px;
    margin: 40px auto !important;
    color: var(--text-primary) !important;
}

.intro-header {
    background: linear-gradient(135deg, var(--aviation-blue) 0%, var(--aviation-blue-light) 100%);
    color: var(--white) !important;
    padding: 60px 40px;
    text-align: center;
    border-radius: var(--border-radius-lg);
    margin-bottom: 40px;
    box-shadow: var(--shadow-medium);
}

.intro-header h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--white) !important;
}

.intro-subtitle {
    font-size: 18px;
    opacity: 0.9;
    color: var(--white) !important;
    max-width: 800px;
    margin: 0 auto 30px;
}

.company-welcome {
    font-size: 16px;
    background: rgba(255, 255, 255, 0.1);
    display: inline-block;
    padding: 10px 24px;
    border-radius: 50px;
    color: var(--white) !important;
}

.intro-content {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-light);
    color: var(--text-primary) !important;
}

.intro-box h2 {
    color: var(--aviation-blue) !important;
    margin-bottom: 30px;
    font-size: 28px;
    text-align: center;
}

.intro-box > p {
    color: var(--text-secondary) !important;
    text-align: center;
    margin-bottom: 40px;
    font-size: 16px;
}

/* Dashboard Styles */
.sms-dashboard {
    max-width: 1400px;
    margin: 40px auto !important;
    color: var(--text-primary) !important;
}

.dashboard-header {
    background: linear-gradient(135deg, var(--aviation-blue) 0%, var(--aviation-blue-light) 100%);
    color: var(--white) !important;
    padding: 40px;
    border-radius: var(--border-radius-lg);
    margin-bottom: 40px;
    box-shadow: var(--shadow-medium);
}

.dashboard-header h1 {
    color: var(--white) !important;
    margin: 0 0 10px;
}

.dashboard-subtitle {
    margin-top: 10px;
    opacity: 0.8;
    color: var(--white) !important;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .sms-login-container,
    .sms-already-logged-in {
        margin: 40px 20px !important;
    }
    
    .login-header,
    .generator-header {
        padding: 30px 20px;
    }
    
    .sms-login-form {
        padding: 30px;
    }
    
    .document-cards {
        grid-template-columns: 1fr;
    }
    
    .sms-navigation {
        flex-wrap: wrap;
        padding: 20px;
    }
    
    .nav-link {
        flex: 1;
        min-width: 140px;
        text-align: center;
        justify-content: center;
    }
    
    .nav-link.logout {
        margin-left: 0;
        flex-basis: 100%;
        margin-top: 10px;
    }
    
    .form-actions,
    .preview-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-back,
    .btn-generate,
    .btn-download,
    .btn-new-doc {
        width: 100%;
        justify-content: center;
    }
    
    .logged-in-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .intro-header {
        padding: 40px 20px;
    }
    
    .intro-header h1 {
        font-size: 28px;
    }
    
    .wizard-intro,
    .sms-dashboard {
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .login-header h2 {
        font-size: 24px;
    }
    
    .generator-header h1 {
        font-size: 28px;
    }
    
    .question-form-container,
    .preview-container {
        padding: 25px 20px;
    }
    
    .document-preview {
        padding: 20px;
    }
    
    .intro-header h1 {
        font-size: 24px;
    }
    
    .intro-subtitle {
        font-size: 16px;
    }
}

/* Print Styles */
@media print {
    .sms-navigation,
    .form-actions,
    .preview-actions,
    .btn {
        display: none !important;
    }
    
    .document-preview {
        max-height: none;
        border: none;
        background: white;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.sms-login-container *:focus,
.sms-document-generator *:focus,
.wizard-intro *:focus,
.sms-dashboard *:focus {
    outline: 3px solid rgba(40, 53, 147, 0.5) !important;
    outline-offset: 2px !important;
}

*:focus:not(:focus-visible) {
    outline: none !important;
}

*:focus-visible {
    outline: 3px solid rgba(40, 53, 147, 0.5) !important;
    outline-offset: 2px !important;
}

/* Force remove any WordPress theme text shadows */
.sms-login-container,
.sms-document-generator,
.wizard-intro,
.sms-dashboard,
.login-header,
.generator-header,
.intro-header,
.dashboard-header {
    text-shadow: none !important;
}

/* Force normal font weights */
.sms-login-container h1,
.sms-login-container h2,
.sms-login-container h3,
.sms-document-generator h1,
.sms-document-generator h2,
.sms-document-generator h3,
.wizard-intro h1,
.wizard-intro h2,
.wizard-intro h3,
.sms-dashboard h1,
.sms-dashboard h2,
.sms-dashboard h3 {
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* Force normal line heights */
.sms-login-container p,
.sms-document-generator p,
.wizard-intro p,
.sms-dashboard p {
    line-height: 1.6 !important;
}

/* Fix for WordPress theme link styles */
.sms-login-container a,
.sms-document-generator a,
.wizard-intro a,
.sms-dashboard a {
    text-decoration: none !important;
    box-shadow: none !important;
}

.sms-login-container a:hover,
.sms-document-generator a:hover,
.wizard-intro a:hover,
.sms-dashboard a:hover {
    text-decoration: underline !important;
}
/* ===== SIMPLE COLOR FIXES ONLY ===== */
/* Add this to the VERY END of your existing CSS file */

/* 1. FIX WHITE TEXT ON BLUE HEADERS */
.login-header,
.generator-header,
.intro-header,
.wizard-header,
.dashboard-header,
.login-header *,
.generator-header *,
.intro-header *,
.wizard-header *,
.dashboard-header * {
    color: #ffffff !important;
}

/* 2. FIX INPUT TEXT COLOR (MOST IMPORTANT) */
input,
textarea,
select,
input[type="text"],
input[type="password"],
input[type="email"] {
    color: #000000 !important;
    background-color: #ffffff !important;
}

/* 3. FIX PLACEHOLDER COLOR */
::placeholder {
    color: #666666 !important;
}

/* 4. FIX BUTTON TEXT COLORS */
.btn-login,
.btn-select-doc,
.btn-generate,
.btn-download {
    color: #ffffff !important;
}

/* 5. FIX CARD TITLES */
.doc-card h3 {
    color: #1a237e !important;
}

/* 6. FIX FORM LABELS */
.form-group label,
.form-question label {
    color: #1a237e !important;
}
/* ============================================ */
/* COMPREHENSIVE COLOR FIX - ADD TO END OF CSS */
/* ============================================ */

/* ===== 1. FIX ALL WHITE TEXT ON WHITE BACKGROUNDS ===== */

/* Fix wizard intro text (was white on light background) */
.wizard-intro .intro-content,
.wizard-intro .intro-box,
.wizard-intro .intro-box *,
.wizard-intro .estimated-time,
.wizard-intro .estimated-time *,
.wizard-intro .recommendation,
.wizard-intro .recommendation * {
    color: #333333 !important; /* Dark gray for readability */
}

/* Fix requirements grid text */
.wizard-intro .requirements-grid,
.wizard-intro .requirements-grid *,
.wizard-intro .req-item,
.wizard-intro .req-item * {
    color: #333333 !important;
}

/* Fix white text in login fields */
#username,
#password {
    color: #000000 !important;
    background-color: #ffffff !important;
}

/* Fix autofill text color */
input:-webkit-autofill {
    -webkit-text-fill-color: #000000 !important;
    -webkit-box-shadow: 0 0 0px 1000px white inset !important;
}

/* ===== 2. FIX ALL WHITE TEXT ON BLUE BACKGROUNDS ===== */

/* Login header */
.login-header,
.login-header *,
.login-header h2,
.login-header p {
    color: #ffffff !important;
}

/* Document generator header */
.generator-header,
.generator-header *,
.generator-header h1,
.generator-header .company-info {
    color: #ffffff !important;
}

/* Wizard intro header */
.intro-header,
.intro-header *,
.intro-header h1,
.intro-header .intro-subtitle,
.intro-header .company-welcome {
    color: #ffffff !important;
}

/* ===== 3. FIX LOGOUT BUTTON (red on red) ===== */

.nav-link.logout {
    color: #ffffff !important; /* White text */
    background-color: #d32f2f !important; /* Red background */
    border: 1px solid #b71c1c !important;
}

.nav-link.logout:hover {
    background-color: #b71c1c !important; /* Darker red on hover */
    color: #ffffff !important;
}

/* ===== 4. FIX ALL FORM INPUT TEXT COLORS ===== */

/* Login form */
#smsLoginForm input[type="text"],
#smsLoginForm input[type="password"] {
    color: #000000 !important;
    background-color: #ffffff !important;
}

/* Document form */
#documentForm input,
#documentForm textarea,
#documentForm select {
    color: #000000 !important;
    background-color: #ffffff !important;
}

/* All other inputs */
input:not([type="submit"]):not([type="button"]),
textarea,
select {
    color: #000000 !important;
    background-color: #ffffff !important;
}

/* ===== 5. FIX PLACEHOLDER TEXT ===== */

::placeholder {
    color: #666666 !important;
    opacity: 1 !important;
}

/* ===== 6. FIX BUTTON TEXT COLORS ===== */

/* White text on colored buttons */
.btn-login,
.btn-select-doc,
.btn-generate,
.btn-download,
.btn-primary,
.nav-link.active {
    color: #ffffff !important;
}

/* Dark text on white/gray buttons */
.btn-back,
.btn-new-doc,
.btn-secondary {
    color: #333333 !important;
}

/* ===== 7. FIX SPECIFIC TEXT ELEMENTS ===== */

/* Card text */
.doc-card h3 {
    color: #1a237e !important; /* Dark blue */
}

.doc-card p {
    color: #444444 !important; /* Dark gray */
}

/* Form labels */
.form-group label,
.form-question label {
    color: #1a237e !important; /* Dark blue */
}

.required {
    color: #d32f2f !important; /* Red */
}

/* Help text */
.help-text {
    color: #666666 !important; /* Medium gray */
}

/* Document preview */
.document-content,
.document-content pre {
    color: #000000 !important; /* Black */
    background-color: #f8f9fa !important; /* Light gray background */
}

/* ===== 8. FIX WIZARD SPECIFIC COLORS ===== */

/* Requirements grid */
.req-item h4 {
    color: #1a237e !important; /* Dark blue */
}

.req-item p {
    color: #444444 !important; /* Dark gray */
}

/* Recommendation box */
.recommendation h4 {
    color: #1a237e !important;
}

.recommendation p {
    color: #444444 !important;
}

/* Estimated time box */
.estimated-time h4 {
    color: #1a237e !important;
}

.estimated-time li {
    color: #444444 !important;
}

/* ===== 9. FIX DASHBOARD COLORS ===== */

.widget h3 {
    color: #1a237e !important;
}

.widget p {
    color: #444444 !important;
}

.status {
    color: #856404 !important; /* Dark yellow for text */
    background-color: #fff3cd !important; /* Light yellow for background */
}

/* ===== 10. FIX MESSAGE COLORS ===== */

.login-message.success,
.sms-message.success {
    color: #155724 !important; /* Dark green text */
    background-color: #d4edda !important; /* Light green background */
    border-color: #c3e6cb !important;
}

.login-message.error,
.sms-message.error {
    color: #721c24 !important; /* Dark red text */
    background-color: #f8d7da !important; /* Light red background */
    border-color: #f5c6cb !important;
}
/* ===== FINAL COLOR FIXES ===== */
/* Add this AFTER all other CSS */

/* Fix blue buttons with black text */
.btn-option,
.btn-action {
    color: #ffffff !important; /* White text on blue buttons */
    background-color: #1a237e !important; /* Aviation blue */
    border-color: #1a237e !important;
}

.btn-option:hover,
.btn-action:hover {
    background-color: #283593 !important; /* Slightly lighter blue on hover */
    color: #ffffff !important;
}

/* Fix logout button (red on red) */
.nav-link.logout {
    color: #ffffff !important; /* White text */
    background-color: #d32f2f !important; /* Red background */
    border: 1px solid #b71c1c !important;
}

.nav-link.logout:hover {
    background-color: #b71c1c !important; /* Darker red on hover */
    color: #ffffff !important;
}

/* Fix any other blue-background buttons */
.btn-primary {
    color: #ffffff !important;
}

/* Fix wizard option cards if needed */
.option-card .btn-option {
    color: #ffffff !important;
}

/* Ensure ALL buttons on colored backgrounds have white text */
[class*="btn-"]:not(.btn-back):not(.btn-new-doc):not(.btn-secondary) {
    color: #ffffff !important;
}
/* ===== FINAL LOGOUT BUTTON FIX ===== */

.nav-link.logout {
    color: #ffffff !important; /* FORCE white text */
    background-color: #d32f2f !important; /* Red background */
}

.nav-link.logout:hover {
    background-color: #b71c1c !important; /* Darker red on hover */
    color: #ffffff !important; /* Keep white text on hover */
}

/* Nuclear option - force immediate application */
a.nav-link.logout {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* If still red, try this more specific selector */
.sms-navigation a.nav-link.logout {
    color: #ffffff !important;
}
/* ===== SIMPLE COLOR FIX - ADD ONLY THIS ===== */
/* ===== FINAL FIX - BEATS WORDPRESS DARK MODE ===== */
/* ===== SIMPLE WORKING COLOR FIX ===== */
/* Add ONLY this to the END of your CSS file */

/* 1. Force black text in ALL inputs - SIMPLE */
#username,
#password,
input[type="text"],
input[type="password"],
textarea {
    color: #000000 !important;
    background-color: #ffffff !important;
}

/* 2. Force placeholder gray */
#username::placeholder,
#password::placeholder {
    color: #888888 !important;
}

/* 3. That's it. Nothing else. */
/* ===== WORKING FIX FOR TWENTY TWENTY-FOUR THEME ===== */

/* 1. Override WordPress dark mode variables FOR YOUR PLUGIN */
.sms-login-container,
.sms-document-generator,
.wizard-intro,
.sms-dashboard,
.sms-wizard-container {
    --wp--preset--color--foreground: #000000 !important;
    --wp--preset--color--background: #ffffff !important;
    color-scheme: light !important;
}

/* 2. Force ALL inputs in your plugin to use light colors */
.sms-login-container input,
.sms-login-container textarea,
.sms-login-container select,
.sms-document-generator input,
.sms-document-generator textarea,
.sms-document-generator select {
    color: #000000 !important;
    background-color: #ffffff !important;
    border-color: #cccccc !important;
}

/* 3. Force black text specifically for login */
#username,
#password {
    color: #000000 !important;
    background-color: #ffffff !important;
}

/* 4. Placeholder text */
#username::placeholder,
#password::placeholder {
    color: #888888 !important;
}
/* ===== FINAL TWO FIXES ===== */

/* 1. Stop the flashing - remove transitions */
input,
textarea {
    transition: none !important;
}

/* 2. Make hint/placeholder text GRAY */
#username::placeholder,
#password::placeholder,
input::placeholder,
textarea::placeholder {
    color: #888888 !important;
}

/* 3. That's it - nothing else */
/* ===== CLEAN COLOR FIX - REPLACE EVERYTHING ===== */

/* 1. Nuclear option for login form */
#smsLoginForm input[type="text"],
#smsLoginForm input[type="password"] {
    color: #000000 !important;
    background-color: #ffffff !important;
    -webkit-text-fill-color: #000000 !important;
    caret-color: #000000 !important;
    transition: none !important;
}

/* 2. Nuclear option for document forms */
#documentForm input,
#documentForm textarea,
#documentForm select {
    color: #000000 !important;
    background-color: #ffffff !important;
    -webkit-text-fill-color: #000000 !important;
    caret-color: #000000 !important;
    transition: none !important;
}

/* 3. Placeholder - light gray */
#username::placeholder,
#password::placeholder {
    color: #888888 !important;
    opacity: 1 !important;
}

/* 4. That's it - nothing else */
/* ===== MAKE ALL PLACEHOLDER TEXT LIGHT GRAY ===== */
::placeholder { color: #888888 !important; }
/* ===== MAKE ALL SMS PLUGIN PLACEHOLDERS LIGHT GRAY ===== */
.sms-login-form input::placeholder,
.form-question input::placeholder,
.form-question textarea::placeholder {
    color: #888888 !important;
}
/* ===== FORCE ALL PLACEHOLDER TEXT LIGHT GRAY ===== */
input::placeholder,
textarea::placeholder,
select::placeholder {
    color: #888888 !important;
    opacity: 1 !important;
}

/* Browser-specific for maximum compatibility */
::-webkit-input-placeholder { color: #888888 !important; }
::-moz-placeholder { color: #888888 !important; }
:-ms-input-placeholder { color: #888888 !important; }
:-moz-placeholder { color: #888888 !important; }

/* ===== CORRECT PLACEHOLDER COLOR FIX ===== */

/* For ALL inputs in your SMS plugin */
.sms-login-container input::placeholder,
.sms-document-generator input::placeholder,
.sms-document-generator textarea::placeholder {
    color: #888888 !important;
    opacity: 1 !important;
}

/* Browser-specific versions */
.sms-login-container input::-webkit-input-placeholder,
.sms-document-generator input::-webkit-input-placeholder,
.sms-document-generator textarea::-webkit-input-placeholder {
    color: #888888 !important;
    opacity: 1 !important;
}

.sms-login-container input::-moz-placeholder,
.sms-document-generator input::-moz-placeholder,
.sms-document-generator textarea::-moz-placeholder {
    color: #888888 !important;
    opacity: 1 !important;
}

.sms-login-container input:-ms-input-placeholder,
.sms-document-generator input:-ms-input-placeholder,
.sms-document-generator textarea:-ms-input-placeholder {
    color: #888888 !important;
    opacity: 1 !important;
}
/* ===== MAKE ALL SMS PLUGIN PLACEHOLDERS LIGHT GRAY ===== */
.sms-login-form input::placeholder,
.form-question input::placeholder,
.form-question textarea::placeholder {
    color: #616161 !important; /* Match the form description color */
}
/* ADD THIS TO THE BOTTOM OF sms-engine.css */

/* Nuclear option for placeholder colors */
body #sms-document-form input::placeholder,
body #sms-document-form textarea::placeholder,
body #sms-login-form input::placeholder,
body #sms-login-form textarea::placeholder {
    color: #999999 !important;
    opacity: 1 !important;
    font-style: italic !important;
}

/* Fix the actual text color too */
body #sms-document-form input,
body #sms-document-form textarea,
body #sms-login-form input,
body #sms-login-form textarea {
    color: #212121 !important;
    background-color: #ffffff !important;
}

/* Target the specific container with high specificity */
.entry-content #sms-document-form input::placeholder,
.entry-content #sms-document-form textarea::placeholder {
    color: #999999 !important;
}

/* SIMPLE FIX FOR TWENTY TWENTY-FOUR THEME */
#sms-document-form input::placeholder,
#sms-document-form textarea::placeholder,
#sms-login-form input::placeholder,
#sms-login-form textarea::placeholder {
    color: #999999 !important;
}

#sms-document-form input,
#sms-document-form textarea,
#sms-login-form input,
#sms-login-form textarea {
    color: #212121 !important;
    background-color: #ffffff !important;
    border: 1px solid #ccc !important;
}
/* ============================================
   ULTIMATE PLACEHOLDER FIX
   Add this to the VERY END of sms-engine.css
   ============================================ */

/* Nuclear option for ALL SMS plugin elements */
.sms-document-generator input::placeholder,
.sms-document-generator textarea::placeholder,
#sms-document-forms input::placeholder,
#sms-document-forms textarea::placeholder,
.sms-form-container input::placeholder,
.sms-form-container textarea::placeholder,
.sms-form input::placeholder,
.sms-form textarea::placeholder,
.sms-login-form input::placeholder,
.sms-login-form textarea::placeholder,
.sms-question-form input::placeholder,
.sms-question-form textarea::placeholder {
    color: #999999 !important;
    opacity: 1 !important;
    font-style: italic !important;
}

/* Browser-specific prefixes for maximum compatibility */
.sms-document-generator input::-webkit-input-placeholder { color: #999999 !important; }
.sms-document-generator input::-moz-placeholder { color: #999999 !important; }
.sms-document-generator input:-ms-input-placeholder { color: #999999 !important; }
.sms-document-generator input:-moz-placeholder { color: #999999 !important; }

/* Also fix the actual input text color */
.sms-document-generator input,
.sms-document-generator textarea,
#sms-document-forms input,
#sms-document-forms textarea {
    color: #212121 !important;
    background-color: #ffffff !important;
}

/* Fix autocomplete background color */
.sms-document-generator input:-webkit-autofill,
.sms-document-generator input:-webkit-autofill:hover, 
.sms-document-generator input:-webkit-autofill:focus,
.sms-document-generator textarea:-webkit-autofill,
.sms-document-generator textarea:-webkit-autofill:hover,
.sms-document-generator textarea:-webkit-autofill:focus {
    -webkit-text-fill-color: #212121 !important;
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
}

/* ============================================
   MAKE PLACEHOLDERS GREY - FINAL FIX
   ============================================ */

.sms-document-generator input::placeholder,
.sms-document-generator textarea::placeholder,
#sms-document-forms input::placeholder,
#sms-document-forms textarea::placeholder,
.sms-form-container input::placeholder,
.sms-form-container textarea::placeholder,
.sms-form input::placeholder,
.sms-form textarea::placeholder,
.sms-login-form input::placeholder,
.sms-login-form textarea::placeholder,
.sms-question-form input::placeholder,
.sms-question-form textarea::placeholder {
    color: #999999 !important;  /* CHANGE TO GREY */
    opacity: 1 !important;
    font-style: italic !important;
}

/* ALSO NEED BROWSER-SPECIFIC VERSIONS */
.sms-document-generator input::-webkit-input-placeholder { color: #999999 !important; }
.sms-document-generator input::-moz-placeholder { color: #999999 !important; opacity: 1 !important; }
.sms-document-generator input:-ms-input-placeholder { color: #999999 !important; }
.sms-document-generator input:-moz-placeholder { color: #999999 !important; opacity: 1 !important; }

/* ============================================
   ULTIMATE PLACEHOLDER FIX - IMPENETRABLE
   ============================================ */

/* Use attribute selectors - WordPress can't override these */
input[class*="sms-"]::placeholder,
textarea[class*="sms-"]::placeholder,
[class*="sms-"] input::placeholder,
[class*="sms-"] textarea::placeholder,
[id*="sms-"] input::placeholder,
[id*="sms-"] textarea::placeholder {
    color: #999999 !important;
    opacity: 1 !important;
    font-style: italic !important;
    content: "Example text" !important; /* Nuclear */
}

/* Use data attributes */
[data-sms-plugin] input::placeholder,
[data-sms-plugin] textarea::placeholder {
    color: #999999 !important;
    font-style: italic !important;
}

/* Force with inline style via JavaScript */
/* Add this to your sms-engine.js */
document.addEventListener('DOMContentLoaded', function() {
    document.querySelectorAll('.sms-document-generator input, .sms-document-generator textarea').forEach(el => {
        el.setAttribute('style', 
            'color: #212121 !important;' +
            'background: white !important;' +
            '--placeholder-color: #999999 !important;'
        );
    });
});
/* COPY THIS ENTIRE BLOCK */
body .sms-document-generator input::-webkit-input-placeholder { color: #999999 !important; opacity: 1 !important; font-style: italic !important; }
body .sms-document-generator input::-moz-placeholder { color: #999999 !important; opacity: 1 !important; font-style: italic !important; }
body .sms-document-generator input:-ms-input-placeholder { color: #999999 !important; opacity: 1 !important; font-style: italic !important; }
body .sms-document-generator input::-ms-input-placeholder { color: #999999 !important; opacity: 1 !important; font-style: italic !important; }
body .sms-document-generator input::placeholder { color: #999999 !important; opacity: 1 !important; font-style: italic !important; }
body .sms-document-generator textarea::-webkit-input-placeholder { color: #999999 !important; opacity: 1 !important; font-style: italic !important; }
body .sms-document-generator textarea::-moz-placeholder { color: #999999 !important; opacity: 1 !important; font-style: italic !important; }
body .sms-document-generator textarea:-ms-input-placeholder { color: #999999 !important; opacity: 1 !important; font-style: italic !important; }
body .sms-document-generator textarea::-ms-input-placeholder { color: #999999 !important; opacity: 1 !important; font-style: italic !important; }
body .sms-document-generator textarea::placeholder { color: #999999 !important; opacity: 1 !important; font-style: italic !important; }

/* Checkbox and Radio Styling */
.form-question .checkbox-option,
.form-question .radio-option {
    display: flex;
    align-items: center;
    margin: 8px 0;
    padding: 5px;
}

.form-question input[type="checkbox"],
.form-question input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    accent-color: #1e3c72; /* Aviation blue */
}

.form-question .checkbox-option label,
.form-question .radio-option label {
    font-size: 14px !important;
    color: #555 !important;
    font-weight: normal !important;
    margin: 0 !important;
}

/* Grid layout for multiple checkboxes */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}
/* Improved Form Styling */
.form-question {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #1e3c72;
}

.question-label {
    display: block;
    font-weight: 600;
    color: #212121 !important;
    font-size: 16px !important;
    margin-bottom: 8px !important;
}

.question-number {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: #1e3c72;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    margin-right: 10px;
    font-size: 14px;
}

.question-help {
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
    font-style: italic;
    padding: 5px 0;
}

/* Form inputs */
.form-input, .form-select, .form-textarea {
    width: 100%;
    max-width: 500px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    background: white;
}

/* Radio and Checkbox Groups */
.radio-group, .checkbox-group {
    margin-top: 10px;
}

.radio-option, .checkbox-option {
    display: flex;
    align-items: flex-start;
    margin: 8px 0;
    padding: 8px 12px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.radio-input, .checkbox-input {
    margin-top: 3px;
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: #1e3c72;
}

.option-label {
    font-size: 15px !important;
    color: #333 !important;
    font-weight: normal !important;
    flex: 1;
    line-height: 1.4;
}

/* Grid layouts */
.checkbox-grid, .radio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
}

.checkbox-grid .checkbox-option,
.radio-grid .radio-option {
    margin: 0;
}

/* Required field indicator */
.required {
    color: #d32f2f;
    margin-left: 4px;
}

/* FAA reference styling */
.faa-reference {
    margin-top: 8px;
    color: #666;
    font-size: 12px;
    font-style: italic;
}
/* Generation Loading Animation */
.generation-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    text-align: center;
    max-width: 500px;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #1e3c72;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content h3 {
    color: #1e3c72;
    margin-bottom: 10px;
    font-size: 22px;
}

.loading-content p {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

.loading-steps {
    text-align: left;
    margin: 30px 0;
}

.loading-steps .step {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    color: #999;
    font-size: 15px;
    position: relative;
    padding-left: 30px;
}

.loading-steps .step:before {
    content: "○";
    position: absolute;
    left: 0;
    color: #ccc;
}

.loading-steps .step.active {
    color: #1e3c72;
}

.loading-steps .step.active:before {
    content: "✓";
    color: #4CAF50;
}

.loading-note {
    font-size: 14px;
    color: #888;
    font-style: italic;
    margin-top: 20px;
}

/* Preview Styles */
.preview-container {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.preview-content {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    max-height: 500px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.btn-download {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 60, 114, 0.3);
}
/* Preview Content Fix */
.preview-content {
    background: white !important;
    color: #212121 !important;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    max-height: 500px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.preview-content pre {
    background: white !important;
    color: #212121 !important;
    font-family: inherit;
    margin: 0;
    padding: 0;
    white-space: pre-wrap;
}

/* Ensure text is readable */
.preview-container * {
    color: #212121 !important;
}

/* Download button visibility */
.btn-download {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white !important;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin: 10px;
}
/* Download Format Options */
.download-options {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    width: 90%;
    max-width: 500px;
    border: 2px solid #1e3c72;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translate(-50%, -60%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.download-options h4 {
    color: #1e3c72;
    margin-bottom: 20px;
    text-align: center;
    font-size: 18px;
}

.format-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.btn-format {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.btn-format:hover:not(:disabled) {
    background: #e8f4ff;
    border-color: #1e3c72;
    transform: translateY(-2px);
}

.btn-format:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.format-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.format-name {
    font-weight: 600;
    color: #212121;
    margin-bottom: 4px;
    font-size: 14px;
}

.format-desc {
    font-size: 12px;
    color: #666;
    line-height: 1.3;
}

.btn-cancel-format {
    width: 100%;
    padding: 10px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #666;
    cursor: pointer;
    font-size: 14px;
}

.btn-cancel-format:hover {
    background: #eee;
}
/* ===== DOWNLOAD MODAL STYLES ===== */
.sms-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: fadeIn 0.3s ease;
    padding: 20px;
}

.sms-modal {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid #e0e0e0;
}

/* Modal Header */
.modal-header {
    display: flex;
    align-items: center;
    padding: 25px 30px;
    background: linear-gradient(135deg, var(--aviation-blue) 0%, #2D5AA0 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    position: relative;
}

.modal-header-icon {
    font-size: 32px;
    margin-right: 20px;
    background: rgba(255, 255, 255, 0.2);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-header-content {
    flex: 1;
}

.modal-header h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
}

.modal-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 15px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    position: absolute;
    top: 25px;
    right: 25px;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Modal Body */
.modal-body {
    padding: 30px;
}

.format-options-grid {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}

.format-option {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.format-option:hover:not(.disabled) {
    border-color: var(--aviation-blue);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.format-option.active {
    border-color: var(--aviation-blue);
    background: rgba(26, 35, 126, 0.05);
}

.format-option.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.format-icon {
    margin-right: 20px;
    flex-shrink: 0;
}

.format-info {
    flex: 1;
}

.format-info h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.coming-soon {
    background: var(--neutral-gray);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.format-description {
    margin: 0 0 12px 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.format-features {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.feature-tag {
    background: rgba(26, 35, 126, 0.1);
    color: var(--aviation-blue);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.format-selected {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.selected-indicator {
    width: 24px;
    height: 24px;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    position: relative;
}

.format-option.active .selected-indicator {
    border-color: var(--aviation-blue);
    background: var(--aviation-blue);
}

.format-option.active .selected-indicator::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* Download Status */
.download-status {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    margin-top: 20px;
    border-left: 4px solid var(--aviation-blue);
}

.status-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.loading-spinner-small {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(26, 35, 126, 0.2);
    border-top-color: var(--aviation-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}

.status-text {
    flex: 1;
}

.status-text h4 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.status-text p {
    margin: 0 0 15px 0;
    color: var(--text-secondary);
}

.progress-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--aviation-blue), var(--aviation-blue-light));
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 3px;
}

.error-icon {
    font-size: 40px;
    color: #dc2626;
    flex-shrink: 0;
}

/* Modal Footer */
.modal-footer {
    padding: 25px 30px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.btn-modal-primary,
.btn-modal-secondary {
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-modal-primary {
    background: linear-gradient(135deg, var(--safety-green) 0%, var(--safety-green-light) 100%);
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-modal-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 168, 83, 0.3);
}

.btn-modal-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-modal-secondary {
    background: white;
    color: var(--text-secondary);
    border: 2px solid #e0e0e0;
}

.btn-modal-secondary:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .sms-modal {
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .modal-header-icon {
        margin-right: 0;
    }
    
    .modal-close {
        position: static;
        align-self: flex-end;
        margin-top: -10px;
        margin-bottom: 10px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .format-option {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .format-icon {
        margin-right: 0;
    }
    
    .format-selected {
        position: absolute;
        top: 15px;
        right: 15px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .btn-modal-primary,
    .btn-modal-secondary {
        width: 100%;
        justify-content: center;
    }
}
/* Fix format-option text colors */
.format-info h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #1a237e !important; /* Force dark blue for better contrast */
    display: flex;
    align-items: center;
    gap: 10px;
}

.format-description {
    margin: 0 0 12px 0;
    color: #424242 !important; /* Darker grey for better contrast */
    font-size: 14px;
    line-height: 1.5;
}

.format-option.active .format-info h4 {
    color: #1a237e !important; /* Ensure active state also has good contrast */
}

.format-option.active .format-description {
    color: #424242 !important; /* Darker grey even in active state */
}

/* Make feature tags more visible */
.feature-tag {
    background: rgba(26, 35, 126, 0.15) !important; /* Slightly darker background */
    color: #1a237e !important; /* Darker blue text */
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(26, 35, 126, 0.2);
}

/* Improve disabled state contrast */
.format-option.disabled .format-info h4 {
    color: #757575 !important; /* Better contrast for disabled */
}

.format-option.disabled .format-description {
    color: #9e9e9e !important; /* Better contrast for disabled */
}

.format-option.disabled .feature-tag {
    background: #f5f5f5 !important;
    color: #9e9e9e !important;
    border-color: #e0e0e0;
}
/* Success and Error states */
.success-icon {
    font-size: 40px;
    color: var(--safety-green);
    flex-shrink: 0;
}

.error-icon {
    font-size: 40px;
    color: #dc2626;
    flex-shrink: 0;
}

.success-note {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 5px;
}

.error-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Ensure text is visible in modal status */
.status-content h4 {
    color: #1a237e !important;
    margin-bottom: 8px;
}

.status-content p {
    color: #424242 !important;
    margin-bottom: 15px;
}
/* Conditional field styling */
.form-question[style*="display: none"] {
    display: none !important;
    transition: opacity 0.3s ease;
}

.form-question[style*="opacity: 0.5"] input,
.form-question[style*="opacity: 0.5"] textarea,
.form-question[style*="opacity: 0.5"] select {
    opacity: 0.5 !important;
    background-color: #f3f4f6 !important;
    cursor: not-allowed !important;
}

.form-question[style*="opacity: 0.5"] label {
    opacity: 0.5 !important;
}

/* Visual cue for disabled "Other" field */
#operation_other:disabled {
    opacity: 0.5 !important;
    background-color: #f3f4f6 !important;
    cursor: not-allowed !important;
    border-color: #e5e7eb !important;
}

/* Active state for "Other" field when enabled */
#operation_other:not(:disabled) {
    opacity: 1 !important;
    background-color: #ffffff !important;
    border-color: #3b82f6 !important;
    transition: all 0.3s ease;
}
/* Conditional field styling - ALWAYS VISIBLE */
.conditional-field {
    transition: all 0.3s ease;
}

.conditional-field:disabled {
    opacity: 0.5 !important;
    background-color: #f3f4f6 !important;
    cursor: not-allowed !important;
    border-color: #e5e7eb !important;
}

.conditional-field:not(:disabled) {
    opacity: 1 !important;
    background-color: #ffffff !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

.field-note {
    margin-top: 8px;
    font-size: 0.85em;
    color: #6b7280;
    transition: all 0.3s ease;
}

.field-note .note-icon {
    margin-right: 5px;
}

/* Faded but visible question container */
.form-question[style*="opacity: 0.8"] label,
.form-question[style*="opacity: 0.8"] .question-help,
.form-question[style*="opacity: 0.8"] .faa-reference {
    opacity: 0.8 !important;
}

/* Make checkbox "Other" option stand out */
.checkbox-option.has-conditional {
    position: relative;
    padding-left: 12px;
}

.checkbox-option.has-conditional::before {
    content: "↓";
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    color: #f59e0b;
    font-weight: bold;
}