/* Calculator Page Styles */

#calculators-section {
    padding: 4rem 0;
    background: var(--light-bg);
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.calculator-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.calculator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.calculator-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-bg);
}

.calculator-header i {
    font-size: 2rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.calculator-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--primary-color);
}

.calculator-description {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.calculator-body {
    margin-top: 1.5rem;
}

.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

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

.calc-button {
    width: 100%;
    padding: 0.9rem;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 1rem;
}

.calc-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.3);
}

.calc-button:active {
    transform: translateY(0);
}

.results {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    display: none;
}

.results.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.result-item {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.result-item:last-child {
    margin-bottom: 0;
}

.result-label {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.result-value {
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
}

.result-note {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.5rem;
    font-style: italic;
}

.result-classification {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.classification-normal {
    background: #d4edda;
    color: #155724;
}

.classification-mild {
    background: #fff3cd;
    color: #856404;
}

.classification-moderate {
    background: #ffe5d0;
    color: #d35400;
}

.classification-severe {
    background: #f8d7da;
    color: #721c24;
}

.classification-profound {
    background: #d6d8db;
    color: #383d41;
}

/* Checkbox Styles */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.checkbox-label:hover {
    background: var(--light-bg);
}

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

/* SNOT Symptoms Styles */
.snot-symptoms {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.symptom-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--light-bg);
    border-radius: 8px;
}

.symptom-item label {
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.95rem;
    margin: 0;
}

.symptom-item input {
    width: 60px;
    padding: 0.5rem;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-weight: 600;
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .calculator-card {
        padding: 1.5rem;
    }

    .checkbox-group {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .calculator-header h3 {
        font-size: 1.1rem;
    }

    .calculator-header i {
        font-size: 1.5rem;
    }

    .checkbox-group {
        grid-template-columns: 1fr;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Scrollbar for SNOT symptoms */
.snot-symptoms::-webkit-scrollbar {
    width: 6px;
}

.snot-symptoms::-webkit-scrollbar-track {
    background: var(--light-bg);
    border-radius: 10px;
}

.snot-symptoms::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 10px;
}

.snot-symptoms::-webkit-scrollbar-thumb:hover {
    background: #5a52e0;
}


/* ET Depth Calculator Styles */
.method-selector {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.method-btn {
    flex: 1;
    min-width: 200px;
    padding: 20px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 500;
    color: #495057;
}

.method-btn i {
    display: block;
    font-size: 32px;
    margin-bottom: 10px;
    color: #6c757d;
}

.method-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-2px);
}

.method-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

.method-btn.active i {
    color: white;
}

.formula-display {
    background: #f8f9fa;
    padding: 15px;
    border-left: 4px solid #667eea;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 25px;
}

.calculate-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.calculate-btn i {
    margin-right: 8px;
}

.result-box {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 10px;
    margin-top: 25px;
    color: white;
}

.result-icon {
    font-size: 48px;
    color: #fff;
}

.result-content {
    flex: 1;
}

.result-content h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.result-value {
    font-size: 36px;
    font-weight: 700;
    margin: 10px 0;
}

.result-note {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 15px;
}

.result-warning {
    background: rgba(255, 255, 255, 0.2);
    padding: 12px;
    border-radius: 5px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-warning i {
    font-size: 18px;
}

.reference-tables {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.reference-table h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
}

.reference-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.reference-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.reference-table th,
.reference-table td {
    padding: 12px;
    text-align: left;
}

.reference-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.reference-table tbody tr:hover {
    background: #e9ecef;
}

.clinical-notes {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.note-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.note-item i {
    font-size: 20px;
    color: #667eea;
    margin-top: 2px;
}

.note-item i.fa-exclamation-triangle {
    color: #e74c3c;
}

.note-item p {
    margin: 0;
    color: #495057;
    line-height: 1.6;
}

.note-item strong {
    color: #2c3e50;
}

@media (max-width: 768px) {
    .method-selector {
        flex-direction: column;
    }
    
    .method-btn {
        min-width: 100%;
    }
    
    .result-box {
        flex-direction: column;
        text-align: center;
    }
    
    .reference-tables {
        grid-template-columns: 1fr;
    }
}


/* Airway Obstruction Calculator Styles */
.table-responsive {
    overflow-x: auto;
    margin-top: 20px;
}

.reference-table-full {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 14px;
}

.reference-table-full thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.reference-table-full th,
.reference-table-full td {
    padding: 12px;
    text-align: center;
    border: 1px solid #dee2e6;
}

.reference-table-full th:first-child,
.reference-table-full td:first-child {
    text-align: left;
    font-weight: 600;
}

.reference-table-full tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.reference-table-full tbody tr:hover {
    background: #e9ecef;
}

/* Grade color coding */
.grade-1 {
    background: #d4edda !important;
    color: #155724;
    font-weight: 600;
}

.grade-2 {
    background: #fff3cd !important;
    color: #856404;
    font-weight: 600;
}

.grade-3 {
    background: #ffe5d0 !important;
    color: #d35400;
    font-weight: 600;
}

.grade-4 {
    background: #f8d7da !important;
    color: #721c24;
    font-weight: 600;
}

.no-obstruction {
    background: #e7f3ff !important;
    color: #004085;
    font-style: italic;
}

.grade-none {
    color: #28a745 !important;
}

/* Grading system display */
.grading-system {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.grade-item {
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.grade-item h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
}

.grade-item p {
    margin: 5px 0;
    font-size: 14px;
}

.grade-1-bg {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.grade-2-bg {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

.grade-3-bg {
    background: linear-gradient(135deg, #ffe5d0 0%, #ffd7ba 100%);
    color: #d35400;
}

.grade-4-bg {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

/* References section */
.references {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.references ol {
    margin: 0;
    padding-left: 20px;
}

.references li {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #495057;
}

.references li:last-child {
    margin-bottom: 0;
}

.references em {
    font-style: italic;
}

@media (max-width: 768px) {
    .reference-table-full {
        font-size: 12px;
    }
    
    .reference-table-full th,
    .reference-table-full td {
        padding: 8px 4px;
    }
    
    .grading-system {
        grid-template-columns: 1fr;
    }
}

/* Balloon Dilation Calculator Specific Styles */
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.result-grid .result-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border-left: none;
    margin-bottom: 0;
}

.result-grid .result-label {
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
}

.result-grid .result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.table-responsive {
    overflow-x: auto;
    margin-top: 20px;
}

.reference-table-full {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.reference-table-full thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.reference-table-full th,
.reference-table-full td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.reference-table-full th {
    font-weight: 600;
    font-size: 0.9rem;
}

.reference-table-full tbody tr:hover {
    background: #f8f9fa;
}

.reference-table-full tbody tr:last-child td {
    border-bottom: none;
}

.table-note {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    margin-top: 10px;
}

.clinical-notes {
    display: grid;
    gap: 15px;
}

.clinical-notes .note-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.clinical-notes .note-item i {
    font-size: 20px;
    color: #667eea;
    margin-top: 2px;
}

.clinical-notes .note-item p {
    margin: 0;
    color: #495057;
    line-height: 1.6;
}

.references-list {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.references-list ol {
    margin: 0;
    padding-left: 20px;
}

.references-list li {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #495057;
}

.references-list li:last-child {
    margin-bottom: 0;
}

.references-list p {
    margin: 0;
}

@media (max-width: 768px) {
    .result-grid {
        grid-template-columns: 1fr;
    }
    
    .reference-table-full {
        font-size: 0.85rem;
    }
    
    .reference-table-full th,
    .reference-table-full td {
        padding: 8px 10px;
    }
}

/* View Toggle Buttons for Airway Sizing Tool */
.view-toggle-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #6c5ce7;
    background: white;
    color: #6c5ce7;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.view-toggle-btn:hover {
    background: #f8f7ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(108, 92, 231, 0.2);
}

.view-toggle-btn.active {
    background: #6c5ce7;
    color: white;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.view-toggle-btn i {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .view-toggle-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}


/* Action Buttons for Equipment List */
.action-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.primary-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

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

.secondary-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: #6c5ce7;
}

/* View Toggle Buttons */
.view-toggle-btn {
    padding: 10px 20px;
    margin: 5px;
    border: 2px solid #6c5ce7;
    background: white;
    color: #6c5ce7;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-toggle-btn.active {
    background: #6c5ce7;
    color: white;
}

.view-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(108, 92, 231, 0.2);
}
