/* RetinaDistanceCalculator.css
 * Retina Distance Calculator - Calculator-specific styles only
 * DO NOT redefine global classes: .glass-card, .form-input, .btn-custom, .btn-sponsor, etc.
 * See GLOBAL_CSS_CLASSES.md for the full list
 */

/* ===== Tab Navigation Enhancements ===== */
.retina-tabs {
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
    margin-bottom: 1.5rem;
}

.retina-tabs .nav-link {
    color: #6c757d;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.retina-tabs .nav-link:hover {
    color: #667eea;
    border-bottom-color: rgba(102, 126, 234, 0.3);
}

.retina-tabs .nav-link.active {
    color: #667eea;
    background: transparent;
    border-bottom-color: #667eea;
}

.retina-tabs .nav-link i {
    margin-right: 0.5rem;
}

/* ===== Mode Description ===== */
.mode-description {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

/* ===== Input Groups ===== */
.input-row {
    margin-bottom: 1rem;
}

.input-label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.input-label i {
    color: #667eea;
    margin-right: 0.5rem;
}

.input-with-unit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-with-unit .unit-label {
    color: #6c757d;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* ===== Resolution Inputs Grid ===== */
.resolution-inputs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.5rem;
    align-items: center;
}

.resolution-inputs .separator {
    color: #667eea;
    font-weight: bold;
    font-size: 1.2rem;
}

/* ===== Advanced Options Toggle ===== */
.advanced-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.75rem 1rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    transition: background 0.3s ease;
    margin-top: 1rem;
}

.advanced-toggle:hover {
    background: rgba(102, 126, 234, 0.1);
}

.advanced-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.advanced-toggle label {
    cursor: pointer;
    margin: 0;
    font-size: 0.95rem;
}

/* ===== Results Display ===== */
.result-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.result-card.highlight {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    border: 2px solid rgba(102, 126, 234, 0.4);
}

.result-label {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    font-family: 'Roboto Mono', monospace;
    line-height: 1.2;
}

.result-value.large {
    font-size: 2.5rem;
}

.result-unit {
    font-size: 1rem;
    color: #764ba2;
    margin-left: 0.25rem;
    font-weight: 500;
}

.result-description {
    font-size: 0.85rem;
    color: #888;
    margin-top: 0.25rem;
}

.result-secondary {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

/* ===== Apple Comparison Section ===== */
.apple-comparison {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
}

.apple-comparison-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.apple-comparison-title i {
    color: #667eea;
}

.apple-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.apple-item:last-child {
    border-bottom: none;
}

.apple-item.better {
    color: #28a745;
}

.apple-item.worse {
    color: #dc3545;
}

.apple-item i {
    font-size: 1rem;
}

/* ===== Screen Dimensions Display ===== */
.screen-dimensions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 0.5rem;
}

.dimension-item {
    text-align: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
}

.dimension-label {
    font-size: 0.8rem;
    color: #6c757d;
}

.dimension-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    font-family: 'Roboto Mono', monospace;
}

/* ===== TV Comparison Table ===== */
.tv-comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.tv-comparison-table th,
.tv-comparison-table td {
    padding: 0.75rem;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.tv-comparison-table th {
    background: rgba(102, 126, 234, 0.1);
    color: #333;
    font-weight: 600;
}

.tv-comparison-table tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.tv-comparison-table .optimal-row {
    background: rgba(40, 167, 69, 0.1);
    font-weight: 600;
}

.tv-comparison-table .optimal-row:hover {
    background: rgba(40, 167, 69, 0.15);
}

.badge-optimal {
    background: #28a745;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.badge-small {
    background: #ffc107;
    color: #333;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.badge-large {
    background: #dc3545;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* ===== Buying Advice Box ===== */
.buying-advice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.25rem;
    border-radius: 12px;
    margin-top: 1rem;
}

.buying-advice-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.buying-advice-content {
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ===== Chart Container ===== */
.chart-container {
    position: relative;
    height: 250px;
    margin-top: 1rem;
}

/* ===== Distance Indicator Visual ===== */
.distance-indicator {
    position: relative;
    height: 60px;
    background: linear-gradient(90deg,
        rgba(220, 53, 69, 0.3) 0%,
        rgba(255, 193, 7, 0.3) 50%,
        rgba(40, 167, 69, 0.3) 100%);
    border-radius: 8px;
    margin: 1rem 0;
    overflow: hidden;
}

.distance-marker {
    position: absolute;
    top: 0;
    height: 100%;
    width: 4px;
    background: #667eea;
    transition: left 0.3s ease;
}

.distance-marker::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #667eea;
}

.distance-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

/* ===== Range Display ===== */
.range-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.range-item {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
}

.range-item-label {
    font-size: 0.8rem;
    color: #6c757d;
}

.range-item-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    font-family: 'Roboto Mono', monospace;
}

.range-separator {
    color: #667eea;
    font-weight: bold;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .retina-tabs .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .result-value {
        font-size: 1.5rem;
    }

    .result-value.large {
        font-size: 2rem;
    }

    .resolution-inputs {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .resolution-inputs .separator {
        display: none;
    }

    .screen-dimensions {
        grid-template-columns: 1fr;
    }

    .tv-comparison-table {
        font-size: 0.8rem;
    }

    .tv-comparison-table th,
    .tv-comparison-table td {
        padding: 0.5rem;
    }

    .chart-container {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .retina-tabs .nav-link span {
        display: none;
    }

    .retina-tabs .nav-link i {
        margin-right: 0;
        font-size: 1.2rem;
    }

    .range-display {
        flex-direction: column;
        gap: 0.5rem;
    }

    .range-separator {
        display: none;
    }
}
