/* VA Combined Rating Calculator Styles */

:root {
    --primary-color: #0066cc;
    --primary-dark: #004c99;
    --secondary-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #6c757d;
    --text-dark: #212529;
    --bilateral-color: #9b59b6;
    --bilateral-light: #f3e5f5;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.header-content i {
    font-size: 2.5rem;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.95;
    font-weight: 400;
}

/* Main Content */
main {
    padding: 40px;
}

section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--medium-gray);
}

.section-header i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.help-text {
    color: var(--dark-gray);
    margin-bottom: 15px;
    line-height: 1.6;
}

/* Input Section */
textarea {
    width: 100%;
    min-height: 250px;
    padding: 15px;
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Manual Form */
.manual-form {
    background: var(--light-gray);
    padding: 25px;
    border-radius: 8px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group.flex-grow {
    flex: 2;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    padding: 10px 12px;
    border: 2px solid var(--medium-gray);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.checkbox-group {
    justify-content: center;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-top: 25px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--medium-gray);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: var(--dark-gray);
    color: white;
}

.btn-success {
    background: var(--secondary-color);
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Disabilities List */
.disabilities-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

/* Bilateral Factor Toggle */
.bilateral-toggle-section {
    background: #fff9e6;
    border: 2px solid var(--warning-color);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-dark);
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
    background: var(--medium-gray);
    border-radius: 15px;
    transition: background 0.3s;
    flex-shrink: 0;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-label input[type="checkbox"]:checked + .toggle-switch {
    background: var(--bilateral-color);
}

.toggle-label input[type="checkbox"]:checked + .toggle-switch::after {
    transform: translateX(30px);
}

.toggle-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-help {
    margin-top: 12px;
    margin-left: 75px;
    color: var(--dark-gray);
    font-size: 0.9rem;
    line-height: 1.5;
}

.disability-item {
    background: var(--light-gray);
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s;
}

.disability-item.bilateral {
    background: var(--bilateral-light);
    border-color: var(--bilateral-color);
}

.disability-item.non-compensable {
    opacity: 0.7;
}

.disability-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.disability-info {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.diag-code {
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.condition-name {
    font-weight: 500;
    color: var(--text-dark);
}

.disability-badges {
    display: flex;
    gap: 8px;
    align-items: center;
}

.rating-badge {
    background: var(--secondary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rating-badge.zero-rating {
    background: var(--dark-gray);
}

.bilateral-badge {
    background: var(--bilateral-color);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.remove-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

.disability-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--medium-gray);
    color: var(--dark-gray);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Results Section */
.result-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
}

.result-main {
    text-align: center;
    margin-bottom: 25px;
}

.result-label {
    font-size: 1.2rem;
    font-weight: 500;
    opacity: 0.95;
    margin-bottom: 10px;
}

.result-value {
    font-size: 4rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.detail-item {
    background: rgba(255, 255, 255, 0.15);
    padding: 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.detail-value {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Calculation Steps */
.calculation-steps {
    margin-top: 30px;
}

.calculation-steps h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--text-dark);
    font-size: 1.3rem;
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step-info,
.step-section,
.step-calculation,
.step-bilateral-factor,
.step-result {
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s;
}

.step-info {
    background: #e3f2fd;
    color: #1976d2;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.step-section {
    background: var(--medium-gray);
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.step-calculation {
    background: var(--light-gray);
    border-left: 4px solid var(--primary-color);
}

.step-calculation.bilateral {
    background: var(--bilateral-light);
    border-left-color: var(--bilateral-color);
}

.step-bilateral-factor {
    background: #fff3cd;
    border: 2px solid var(--warning-color);
    border-left-width: 6px;
}

.step-result {
    background: #d4edda;
    border: 2px solid var(--secondary-color);
    border-left-width: 6px;
    font-weight: 600;
}

.step-main {
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-detail {
    font-size: 0.9rem;
    color: var(--dark-gray);
    padding-left: 20px;
}

/* Info Box */
.info-box {
    background: #e3f2fd;
    border-left: 4px solid #1976d2;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

.info-box i {
    color: #1976d2;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-box strong {
    display: block;
    margin-bottom: 8px;
    color: #1976d2;
}

.info-box p {
    line-height: 1.6;
    color: var(--text-dark);
    margin: 0;
}

/* Pathway to 100% Section */
.pathway-section {
    margin-top: 40px;
    padding: 30px;
    background: #f0f8ff;
    border-radius: 12px;
    border: 2px solid #4a90e2;
}

.pathway-intro {
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #4a90e2;
}

.pathway-intro p {
    margin: 8px 0;
    line-height: 1.6;
}

.pathway-subsection {
    margin-top: 30px;
    padding: 25px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.pathway-subsection h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.subsection-help {
    color: var(--dark-gray);
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.pathway-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pathway-item {
    background: var(--light-gray);
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    padding: 18px;
    transition: all 0.3s;
}

.pathway-item:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.pathway-item.reaches-goal {
    border-color: #ffd700;
    background: #fffef0;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.2);
}

.pathway-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--medium-gray);
}

.pathway-item-title {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pathway-item-title strong {
    color: var(--text-dark);
    font-size: 1.05rem;
}

.goal-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #654321;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.4);
}

.pathway-item-rating {
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    white-space: nowrap;
}

.pathway-item-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pathway-item-detail {
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 0.95rem;
}

.pathway-item-detail strong {
    color: var(--primary-dark);
}

.pathway-item-result {
    margin-top: 10px;
    padding: 12px;
    background: #e3f2fd;
    border-radius: 6px;
    font-weight: 600;
    color: #1976d2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pathway-item-result strong {
    font-size: 1.1rem;
    color: var(--primary-dark);
}

.pathway-disclaimer {
    margin-top: 30px;
    padding: 20px;
    background: #fff3cd;
    border: 2px solid var(--warning-color);
    border-radius: 8px;
    display: flex;
    gap: 15px;
    align-items: start;
}

.pathway-disclaimer i {
    color: var(--warning-color);
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.pathway-disclaimer p {
    line-height: 1.6;
    margin: 0;
    color: var(--text-dark);
}

.no-results {
    text-align: center;
    padding: 40px;
    color: var(--dark-gray);
    font-style: italic;
}

.more-note {
    text-align: center;
    padding: 15px;
    color: var(--dark-gray);
    font-style: italic;
    margin-top: 10px;
}

/* Footer */
footer {
    background: var(--light-gray);
    padding: 25px;
    text-align: center;
    color: var(--dark-gray);
}

footer p {
    margin: 5px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    main {
        padding: 20px;
    }

    header {
        padding: 25px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .header-content i {
        font-size: 2rem;
    }

    .form-row {
        flex-direction: column;
    }

    .result-value {
        font-size: 3rem;
    }

    .result-details {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .disability-header {
        flex-wrap: wrap;
    }

    .disability-info {
        width: 100%;
    }
    
    .toggle-help {
        margin-left: 0;
    }
    
    .pathway-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .pathway-item-rating {
        width: 100%;
        text-align: center;
    }
}

@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
    }

    .input-section,
    .manual-section,
    .button-group,
    .remove-btn {
        display: none !important;
    }
}
