/**
 * Tyre Pressure Calculator Styles
 */

.pressure-calculator-container {
    max-width: 1000px;
    margin: 0 auto;
}

.pressure-calculator-container h1 {
    margin-bottom: 10px;
}

.pressure-calculator-container .lead {
    color: #666;
    margin-bottom: 30px;
}

/* Calculator Form */
.calculator-form {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

/* Tyre Sections */
.tyre-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    height: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tyre-section h2 {
    font-size: 1.25rem;
    margin-bottom: 5px;
    padding-bottom: 0;
    background: none;
    border: none;
}

.tyre-section .section-subtitle {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.original-tyre {
    border-left: 4px solid #0d6efd;
}

.new-tyre {
    border-left: 4px solid #198754;
}

/* Tyre Size Inputs */
.tyre-size-inputs {
    display: flex;
    align-items: center;
    gap: 5px;
}

.tyre-size-inputs .form-select {
    width: auto;
    flex: 1;
    min-width: 70px;
}

.size-separator {
    font-weight: bold;
    color: #666;
    padding: 0 2px;
}

/* Unit Select */
.unit-select {
    max-width: 80px;
}

/* Load Range Group */
.load-range-group {
    transition: all 0.3s ease;
}

/* Calculate Button */
#calculate-btn {
    padding: 12px 40px;
    font-size: 1.1rem;
}

/* Results Section */
.results-section {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Dual Results Layout */
.dual-results {
    margin-bottom: 25px;
}

.result-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.result-card-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #fff;
}

.result-card-header .badge {
    font-size: 0.7rem;
}

.result-tra .result-card-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
}

.result-conservative .result-card-header {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.result-card-body {
    padding: 25px 20px;
    text-align: center;
}

.result-card .result-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #333;
}

.result-card .result-value .unit {
    font-size: 1.2rem;
    color: #666;
}

.result-card .result-alt {
    font-size: 1rem;
    color: #666;
    margin-top: 5px;
}

/* Legacy single result (kept for compatibility) */
.result-main {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    margin-bottom: 25px;
}

.result-main h3 {
    color: #666;
    font-size: 1rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-value {
    font-size: 3rem;
    font-weight: bold;
    color: #198754;
}

.result-value .unit {
    font-size: 1.5rem;
    color: #666;
}

.result-alt {
    display: block;
    font-size: 1.2rem;
    color: #666;
    margin-top: 5px;
}

.result-status {
    margin-top: 15px;
    font-size: 1rem;
}

.result-status.success {
    color: #198754;
}

.result-status.success::before {
    content: "\2713 ";
}

.result-status.warning {
    color: #ffc107;
}

.result-status.warning::before {
    content: "\26A0 ";
}

.result-status.danger {
    color: #dc3545;
}

.result-status.danger::before {
    content: "\2717 ";
}

/* Comparison Table */
.comparison-table {
    margin-bottom: 25px;
}

.comparison-table h4 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.comparison-table table {
    margin-bottom: 0;
}

.comparison-table th {
    background: #f8f9fa;
    text-align: center;
}

.comparison-table td:first-child {
    font-weight: 500;
    background: #f8f9fa;
}

.comparison-table td:not(:first-child) {
    text-align: center;
}

.highlight-cell {
    background: #d4edda !important;
    font-weight: bold;
}

/* Chart Section */
.chart-section {
    margin-top: 25px;
}

.chart-section h4 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Disclaimer Warning - Red and Impactful */
.disclaimer-warning {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: 2px solid #a71d2a;
    border-radius: 10px;
    padding: 20px 25px;
    margin: 25px 0;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.disclaimer-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.disclaimer-icon i {
    font-size: 1.5rem;
    color: #fff;
}

.disclaimer-content {
    flex: 1;
    color: #fff;
}

.disclaimer-content strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.disclaimer-content p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
}

/* Technical Explanation Section */
.technical-explanation {
    margin-top: 40px;
    padding: 30px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.technical-explanation h3 {
    font-size: 1.3rem;
    color: #495057;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.tech-content h4 {
    font-size: 1rem;
    color: #6c757d;
    margin-top: 20px;
    margin-bottom: 8px;
    font-weight: 600;
}

.tech-content h4:first-child {
    margin-top: 0;
}

.tech-content p {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 0;
}

/* Advanced Options Section */
.advanced-options-section {
    margin-top: 20px;
}

.advanced-options-title {
    margin-bottom: 0;
}

.advanced-toggle {
    width: 100%;
    text-align: left;
    color: #495057;
    text-decoration: none;
    font-size: 1rem;
    padding: 10px 15px;
    background: #e9ecef;
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
}

.advanced-toggle:hover {
    background: #dee2e6;
    color: #495057;
    text-decoration: none;
}

.advanced-toggle .toggle-icon {
    margin-left: auto;
    transition: transform 0.3s;
}

.advanced-toggle.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

#advancedOptions {
    background: #fff;
    border-radius: 0 0 8px 8px;
    padding: 0;
    margin-top: 0;
}

#advancedOptions.show,
#advancedOptions.collapsing {
    padding: 20px;
    border: 1px solid #e9ecef;
    border-top: none;
}

.option-group {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    height: 100%;
}

.option-group .form-label {
    margin-bottom: 12px;
}

.option-group .form-check {
    margin-bottom: 8px;
}

.option-group .form-check-label small {
    display: block;
    margin-top: 2px;
}

.temp-unit-select {
    max-width: 70px;
}

/* Method Comparison Section */
.method-comparison {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
}

.method-comparison h4 {
    color: #495057;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.comparison-explanation .explanation-summary {
    background: #fff;
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #0d6efd;
}

.comparison-explanation .explanation-summary p {
    margin: 0;
    font-size: 1.05rem;
}

.comparison-explanation .explanation-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.comparison-explanation .method-explanation {
    background: #fff;
    padding: 15px 20px;
    border-radius: 6px;
}

.comparison-explanation .method-explanation h5 {
    margin-bottom: 10px;
    font-size: 1rem;
}

.comparison-explanation .method-explanation p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

.comparison-explanation .explanation-recommendation {
    background: #fff3cd;
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #ffc107;
}

.comparison-explanation .explanation-recommendation h5 {
    color: #856404;
    margin-bottom: 10px;
}

.comparison-explanation .explanation-recommendation ul {
    margin: 0;
    padding-left: 20px;
}

.comparison-explanation .explanation-recommendation li {
    font-size: 0.9rem;
    color: #856404;
    margin-bottom: 5px;
}

.comparison-explanation .explanation-recommendation li:last-child {
    margin-bottom: 0;
}

.comparison-explanation .explanation-disclaimer {
    background: #f8d7da;
    padding: 15px 20px;
    border-radius: 6px;
    border-left: 4px solid #dc3545;
}

.comparison-explanation .explanation-disclaimer p {
    margin: 0;
    font-size: 0.85rem;
    color: #721c24;
    line-height: 1.6;
}

/* Temperature Adjusted Result - Updated for dual display */
.temp-adjusted-result {
    background: #e3f2fd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #90caf9;
}

.temp-adjusted-result h4 {
    color: #1565c0;
    margin-bottom: 15px;
}

.temp-adjusted-intro {
    margin-bottom: 15px;
    color: #1565c0;
}

.temp-box {
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.temp-box-tra {
    border-left: 4px solid #0d6efd;
}

.temp-box-conservative {
    border-left: 4px solid #17a2b8;
}

.temp-label {
    font-weight: 600;
    color: #666;
}

.temp-value {
    font-weight: bold;
    font-size: 1.1rem;
    color: #333;
}

.temp-explanation {
    margin-top: 15px;
    margin-bottom: 0;
    color: #1565c0;
    font-size: 0.85rem;
}

/* Index Temp Note */
.result-index-note {
    margin-top: 10px;
    margin-bottom: 0;
}

/* Legacy temp-adjusted-box (kept for compatibility) */
.temp-adjusted-box {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: #fff;
}

.temp-adjusted-box h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.temp-adjusted-value {
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
}

.temp-adjusted-value .unit {
    font-size: 1.2rem;
    opacity: 0.9;
}

.temp-adjusted-value .result-alt {
    display: block;
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 5px;
}

.temp-adjusted-note {
    margin-top: 10px;
    margin-bottom: 5px;
    font-size: 0.95rem;
    opacity: 0.95;
}

/* Method Badge in Results */
.result-main h3 .badge {
    font-size: 0.65rem;
    vertical-align: middle;
    margin-left: 8px;
    font-weight: 500;
}

/* Related Tools */
.related-tools {
    text-align: center;
    color: #666;
}

.related-tools a {
    color: #0d6efd;
    text-decoration: none;
}

.related-tools a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .calculator-form {
        padding: 15px;
    }

    .tyre-section {
        margin-bottom: 20px;
    }

    .tyre-size-inputs {
        flex-wrap: wrap;
    }

    .tyre-size-inputs .form-select {
        min-width: 60px;
    }

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

    .chart-container {
        height: 250px;
    }

    #calculate-btn {
        width: 100%;
    }

    .disclaimer-warning {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 15px;
    }

    .disclaimer-icon {
        margin: 0 auto;
    }

    .technical-explanation {
        padding: 20px;
    }

    /* Advanced options responsive */
    .option-group {
        margin-bottom: 15px;
    }

    #advancedOptions .col-md-6:last-child .option-group {
        margin-bottom: 0;
    }

    .temp-adjusted-value {
        font-size: 1.75rem;
    }

    /* Dual results responsive */
    .dual-results .col-md-6 {
        margin-bottom: 15px;
    }

    .dual-results .col-md-6:last-child {
        margin-bottom: 0;
    }

    .result-card .result-value {
        font-size: 2rem;
    }

    /* Method comparison responsive */
    .comparison-explanation .explanation-details {
        grid-template-columns: 1fr;
    }

    .temp-box {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
}

@media (max-width: 576px) {
    .result-value {
        font-size: 2rem;
    }

    .result-alt {
        font-size: 1rem;
    }
}
