/* COBRA Letter Generator - Main Styles */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
}

/* Header Styles */
.header-bar {
    background: #1a365d;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: white !important;
    text-decoration: none;
}

.subtitle {
    font-size: 14px;
    opacity: 0.9;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    padding: 5px 10px;
    transition: opacity 0.3s ease;
}

.main-nav a:hover {
    opacity: 0.8;
}

.login-btn {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 8px 16px !important;
}

.cta-btn {
    background: #4299e1;
    color: white !important;
    padding: 8px 16px !important;
    border-radius: 4px;
    font-weight: 500;
}

.cta-btn:hover {
    background: #2b6cb0;
    opacity: 1 !important;
}

/* Container and Layout */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.main-header {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    text-align: center;
}

.main-header h1 {
    color: #1a365d;
    margin-bottom: 10px;
}

.form-container {
    background: white;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 0 20px;
}

.step {
    flex: 1;
    text-align: center;
    padding: 10px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
}

.step:hover {
    transform: translateY(-2px);
}

.step::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -50%;
    width: 100%;
    height: 2px;
    background: #ddd;
    z-index: -1;
}

.step:last-child::after {
    display: none;
}

.step.active {
    color: #1a365d;
    font-weight: bold;
}

.step.completed {
    color: #27ae60;
}

.step.completed::after {
    background: #27ae60;
}

.step-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 16px;
    /* Default inactive state */
    background: #ddd;
    color: #666;
}

.step.active .step-number {
    background: #1a365d;
    color: white;
}

.step.completed .step-number {
    background: #27ae60;
    color: white;
}

/* Form Sections */
.form-section {
    margin-bottom: 20px;
    display: block !important; /* Ensure form sections are always visible */
}

.form-section.active {
    display: block;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

/* Form Elements */
label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #555;
}

.required {
    color: #e74c3c;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3498db;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin: 10px 0;
}

input[type="checkbox"],
input[type="radio"] {
    margin-right: 10px;
}

/* Buttons */
.button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

button {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.add-dependent-btn {
    background: #27ae60;
    color: white;
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

.remove-btn {
    background: #e74c3c;
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.load-company-btn {
    background: #4169e1;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
}

/* Sections and Components */
.section-title {
    font-size: 1.4em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
    color: #1a365d;
}

.sub-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
    margin: 20px 0;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin: 10px 0;
}

.info-box {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.info-box h4 {
    color: #1976d2;
    margin-bottom: 5px;
}

/* Tables */
.coverage-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.coverage-table th,
.coverage-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: center;
}

.coverage-table th {
    background: #f8f9fa;
    font-weight: 600;
    text-align: center;
}

.coverage-table td:first-child,
.coverage-table th:first-child {
    text-align: left;
}

/* Notice Selection */
.notice-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.notice-card {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.notice-card:hover {
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.notice-card.selected {
    border-color: #27ae60;
    background: #f0fff4;
}

.notice-card h3 {
    margin-bottom: 10px;
    color: #1a365d;
}

.notice-card p {
    font-size: 14px;
    color: #666;
}

/* Plan Rates Section */
.plan-rates-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.plan-checkbox {
    margin-bottom: 15px;
}

.rate-input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.rate-input-group {
    background: white;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.rate-input-group h4 {
    margin-bottom: 10px;
    color: #1a365d;
}

/* Letter Styles */
.generated-letter {
    background: white;
    padding: 60px;
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 600px;
    font-family: Arial, sans-serif;
    line-height: 1.8;
    color: #333;
}

.letter-header {
    margin-bottom: 30px;
}

.letter-header h2 {
    color: #1a365d;
    margin-bottom: 10px;
}

.letter-body {
    text-align: left;
}

.letter-body p {
    margin-bottom: 15px;
}

.letter-body ul {
    margin-left: 30px;
    margin-bottom: 15px;
}

.letter-body li {
    margin-bottom: 5px;
}

.important-date {
    font-weight: bold;
    font-size: 1.1em;
    color: #d32f2f;
}

.coverage-breakdown {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 4px;
    margin: 20px 0;
}

.coverage-breakdown table {
    width: 100%;
    border-collapse: collapse;
}

.coverage-breakdown th,
.coverage-breakdown td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.coverage-breakdown th {
    font-weight: bold;
    color: #1a365d;
}

/* Special Sections */
.download-options {
    display: flex;
    gap: 20px;
    align-items: center;
    margin: 20px 0;
}

.language-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

.dependent-address {
    background: #fff3e0;
    padding: 15px;
    border-radius: 4px;
    margin-top: 10px;
    border: 1px solid #ffb74d;
}

.saved-company {
    background: #f0f8ff;
    border: 1px solid #4169e1;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.saved-company h4 {
    color: #4169e1;
    margin-bottom: 10px;
}

.hra-section {
    background: #e8f5e9;
    border: 2px solid #4caf50;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
}

.hra-section h3 {
    color: #2e7d32;
    margin-bottom: 15px;
}

/* Utility Classes */
.help-text {
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

.error {
    border-color: #e74c3c !important;
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
}

.tier-description {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Header Adjustments */
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .main-nav {
        flex-direction: column;
        width: 100%;
    }

    .main-nav a {
        width: 100%;
        padding: 10px;
        text-align: center;
    }

    /* Form Adjustments */
    .form-row,
    .form-row-3 {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Button Groups */
    .button-group {
        flex-direction: column;
        gap: 15px;
    }

    .button-group button {
        width: 100%;
    }

    /* Step Indicator */
    .step-indicator {
        flex-direction: column;
        gap: 10px;
        padding: 0;
    }

    .step::after {
        display: none;
    }

    /* Container Padding */
    .container {
        padding: 10px;
    }

    .form-container {
        padding: 20px;
    }

    /* Table Responsiveness */
    .coverage-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Notice Selection */
    .notice-selection {
        grid-template-columns: 1fr;
    }

    /* Plan Rates Section */
    .rate-input-grid {
        grid-template-columns: 1fr;
    }

    /* Generated Letter */
    .generated-letter {
        padding: 20px;
    }

    /* User Menu */
    .user-menu {
        width: 100%;
    }

    .menu-dropdown {
        width: 100%;
        position: static;
        box-shadow: none;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 2em;
    }

    .hero-subtitle {
        font-size: 1.1em;
    }

    .section-title {
        font-size: 1.2em;
    }

    .form-container {
        padding: 15px;
    }

    input[type="text"],
    input[type="tel"],
    input[type="email"],
    input[type="number"],
    input[type="date"],
    select,
    textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .feature-card {
        padding: 15px;
    }
}

/* Print Styles - Keep at the end */
@media print {
    body {
        background: white;
    }
    .container {
        max-width: 100%;
    }
    .header-bar, .form-container, .button-group {
        display: none;
    }
    .generated-letter {
        border: none;
        box-shadow: none;
        padding: 0;
        font-size: 12pt;
    }
}

/* User Menu Styles */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.user-email {
    color: #2d3748;
    margin-right: 8px;
}

.menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    display: none;
    z-index: 1000;
}

.user-menu:hover .menu-dropdown {
    display: block;
}

.menu-dropdown a {
    display: block;
    padding: 12px 16px;
    color: #4a5568;
    text-decoration: none;
    transition: background 0.3s ease;
}

.menu-dropdown a:hover {
    background: #f7fafc;
    color: #2b6cb0;
}

.menu-dropdown a:not(:last-child) {
    border-bottom: 1px solid #e2e8f0;
}

/* Protected Route Styles */
.protected-content {
    display: none;
}

.authenticated .protected-content {
    display: block;
}

.unauthenticated .public-only {
    display: block;
}

.authenticated .public-only {
    display: none;
}

/* Footer Styles */
footer {
    background: #1a365d;
    color: white;
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    margin-bottom: 20px;
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 15px;
}

.footer-section a {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-section {
        margin-bottom: 30px;
    }
} 