/**
 * GATO CO2 Calculator — Scoped Styles
 *
 * All selectors prefixed with .gato-co2-calculator to avoid theme conflicts.
 *
 * @package GATO_CO2
 */

/* ──────────────────────────────────────────── */
/* Hide Page Title & Divi Wrappers on CO2 Page  */
/* ──────────────────────────────────────────── */
body.page-id-5935 h1.entry-title.main_title,
body.page-id-5935 .entry-title,
body.page-id-5935 .main_title,
#post-5935 h1.entry-title.main_title,
#post-5935 .entry-title,
#post-5935 .main_title {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    visibility: hidden !important;
    overflow: hidden !important;
}

/* Remove vertical grey line from container::before on CO2 pages */
body.page-id-5935 .container::before,
body.page-id-5935 .container::after,
body.page-id-5935 #content-area::before,
body.page-id-5935 #content-area::after,
body.page-id-5935 #left-area::before,
body.page-id-5935 #left-area::after {
    display: none !important;
    content: none !important;
    border: none !important;
}

/* CO2 page background image */
body.page-id-5935,
body.page-id-5935 #main-content,
body.page-id-5935 #page-container,
body.page-id-5935 #content-area,
body.page-id-5935 #left-area,
body.page-id-5935 #left-area > article,
body.page-id-5935 #left-area > article > .entry-content,
body.page-id-5935 #left-area > article > .entry-content > .et_pb_section,
body.page-id-5935 #left-area > article > .entry-content > .et_pb_section > .et_pb_row,
body.page-id-5935 #left-area > article > .entry-content > .et_pb_section > .et_pb_row > .et_pb_column,
body.page-id-5935 #left-area > article > .entry-content > .et_pb_section > .et_pb_row > .et_pb_column > .et_pb_code,
body.page-id-5935 #left-area > article > .entry-content > .et_pb_section > .et_pb_row > .et_pb_column > .et_pb_code > .et_pb_code_inner {
    background: none !important;
    background-color: transparent !important;
}

body.page-id-5935 {
    background: url('http://localhost:8080/wp-content/uploads/2022/08/Cameroun-garden-3-scaled.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
}

/* Center CO2 page content — force all wrappers to full width, block display, and center alignment */
body.page-id-5935 #content-area,
body.page-id-5935 #left-area,
body.page-id-5935 #left-area > article,
body.page-id-5935 #left-area > article > .entry-content,
body.page-id-5935 #left-area > article > .entry-content > .et_pb_section,
body.page-id-5935 #left-area > article > .entry-content > .et_pb_section > .et_pb_row,
body.page-id-5935 #left-area > article > .entry-content > .et_pb_section > .et_pb_row > .et_pb_column,
body.page-id-5935 #left-area > article > .entry-content > .et_pb_section > .et_pb_row > .et_pb_column > .et_pb_code,
body.page-id-5935 #left-area > article > .entry-content > .et_pb_section > .et_pb_row > .et_pb_column > .et_pb_code > .et_pb_code_inner {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    float: none !important;
    text-align: center !important;
}

/* ──────────────────────────────────────────── */
/* Base Container                               */
/* ──────────────────────────────────────────── */
.gato-co2-calculator {
    max-width: 900px;
    margin: 40px auto;
    padding: 48px 36px;
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(240,250,247,0.95) 100%);
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0, 89, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
    font-family: 'Montserrat', Arial, sans-serif;
    color: #2c3e3a;
}

/* Force center on CO2 page using inline-block + text-align trick */
body.page-id-5935 .gato-co2-calculator {
    display: inline-block !important;
    width: 100% !important;
    max-width: 900px !important;
    vertical-align: middle !important;
}

/* Ensure Divi fixed header always stays above calculator content */
#et-header,
.et-header-e,
.et-blob,
.et-tb-header-container,
.et-fixed-header {
    position: fixed !important;
    z-index: 99999 !important;
}

/* ──────────────────────────────────────────── */
/* Page Visibility                              */
/* ──────────────────────────────────────────── */
.gato-page {
    display: block;
}

.gato-hidden {
    display: none !important;
}

/* ──────────────────────────────────────────── */
/* Animations                                   */
/* ──────────────────────────────────────────── */
.gato-fade-in {
    animation: gatoFadeIn 0.5s forwards;
}

.gato-fade-out {
    animation: gatoFadeOut 0.5s forwards;
}

@keyframes gatoFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes gatoFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(20px); }
}

/* ──────────────────────────────────────────── */
/* Title                                        */
/* ──────────────────────────────────────────── */
.gato-title {
    color: #005900;
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 32px;
    text-align: center;
    letter-spacing: -0.5px;
}

/* ──────────────────────────────────────────── */
/* Trip Type Selector                           */
/* ──────────────────────────────────────────── */
.gato-trip-type {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.gato-trip-btn {
    background: #fff;
    color: #666;
    border: 2px solid #ddd;
    border-radius: 30px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.gato-trip-btn:hover {
    border-color: #005900;
    color: #005900;
    box-shadow: 0 4px 12px rgba(0, 89, 0, 0.15);
}

.gato-trip-btn.active {
    background: linear-gradient(135deg, #005900 0%, #3b9d2b 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(0, 89, 0, 0.3);
}

/* ──────────────────────────────────────────── */
/* Airport Inputs                               */
/* ──────────────────────────────────────────── */
.gato-airport-group {
    margin-bottom: 20px;
}

.gato-airport-group label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #2c3e3a;
    letter-spacing: 0.3px;
}

.gato-airport-group input[type="text"],
.gato-transfer-city-dropdown {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    border: 2px solid #d4e5de;
    border-radius: 12px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.gato-airport-group input[type="text"]:focus,
.gato-transfer-city-dropdown:focus {
    border-color: #2E987D;
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 89, 0, 0.12), 0 4px 12px rgba(0, 89, 0, 0.1);
}

/* ──────────────────────────────────────────── */
/* Flight Options (Class + Aircraft)            */
/* ──────────────────────────────────────────── */
.gato-flight-options {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.gato-option-group {
    flex: 1;
    min-width: 180px;
}

.gato-option-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #555;
}

.gato-option-group select {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 2px solid #d4e5de;
    border-radius: 12px;
    box-sizing: border-box;
    background: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.gato-option-group select:focus {
    border-color: #2E987D;
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 89, 0, 0.12);
}

/* ──────────────────────────────────────────── */
/* Transfer Airports                            */
/* ──────────────────────────────────────────── */
#gato-transfer-container {
    margin-bottom: 16px;
}

.gato-transfer-airport {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.gato-transfer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.gato-transfer-header h4 {
    margin: 0;
    font-size: 15px;
    color: #2E987D;
}

.gato-remove-transfer-btn {
    background: #e57373;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.gato-remove-transfer-btn:hover {
    background: #ef5350;
}

/* ──────────────────────────────────────────── */
/* Add Transfer Button                          */
/* ──────────────────────────────────────────── */
.gato-add-transfer-btn {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    background: transparent;
    border: 2px dashed #2E987D;
    border-radius: 8px;
    color: #2E987D;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.gato-add-transfer-btn:hover {
    background: #e8f5e9;
}

/* ──────────────────────────────────────────── */
/* Action Buttons                               */
/* ──────────────────────────────────────────── */
.gato-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
}

.gato-btn {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.gato-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.gato-btn:active {
    transform: translateY(0);
}

.gato-btn-reset {
    background: #fff;
    color: #666;
    border: 2px solid #ddd;
}

.gato-btn-reset:hover {
    border-color: #005900;
    color: #005900;
}

.gato-btn-calculate {
    background: linear-gradient(135deg, #005900 0%, #3b9d2b 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 89, 0, 0.3);
}

.gato-btn-calculate:hover {
    box-shadow: 0 8px 24px rgba(0, 89, 0, 0.4);
}

.gato-btn-back {
    background: #fff;
    color: #666;
    border: 2px solid #ddd;
}

.gato-btn-back:hover {
    border-color: #005900;
    color: #005900;
}

.gato-btn-continue {
    background: linear-gradient(135deg, #005900 0%, #3b9d2b 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 89, 0, 0.3);
}

.gato-btn-continue:hover {
    box-shadow: 0 8px 24px rgba(0, 89, 0, 0.4);
}

.gato-btn-project {
    background: #3b9d2b;
    color: #fff;
    margin-top: 10px;
}

.gato-btn-project:hover {
    background: #2e8522;
}

.gato-btn-select {
    background: linear-gradient(135deg, #005900 0%, #3b9d2b 100%);
    color: #fff;
    margin-top: 10px;
    margin-bottom: 8px;
    width: 100%;
}

.gato-btn-select:hover {
    background: linear-gradient(135deg, #004d00 0%, #338a24 100%);
}

/* ──────────────────────────────────────────── */
/* Results Box                                  */
/* ──────────────────────────────────────────── */
.gato-results-box {
    background: linear-gradient(135deg, rgba(0,89,0,0.08) 0%, rgba(59,157,43,0.08) 100%);
    border: 2px solid rgba(0, 89, 0, 0.2);
    border-radius: 16px;
    padding: 36px;
    text-align: center;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0, 89, 0, 0.1);
}

.gato-itinerary {
    font-size: 16px;
    margin-bottom: 16px;
    color: #444;
}

.gato-co2-result {
    font-size: 20px;
    color: #005900;
}

.gato-co2-result span:first-child {
    font-size: 36px;
    font-weight: 700;
}

/* ──────────────────────────────────────────── */
/* Project Cards                                */
/* ──────────────────────────────────────────── */
.gato-project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 24px 0;
}

.gato-project-card {
    background: #fff;
    border: 2px solid #e8f0ec;
    border-radius: 16px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
}

.gato-project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 89, 0, 0.15);
}

.gato-project-card.selected {
    border-color: #005900;
    background-color: #f0faf7;
    box-shadow: 0 0 0 4px rgba(0, 89, 0, 0.2), 0 12px 32px rgba(0, 89, 0, 0.2);
    transform: translateY(-6px);
}

.gato-project-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.gato-project-details {
    padding: 16px;
}

.gato-project-details h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #005900;
}

.gato-project-desc {
    font-size: 13px;
    color: #777;
    margin: 0 0 8px;
}

.gato-project-price {
    font-size: 14px;
    color: #555;
    margin: 0 0 4px;
}

.gato-project-total {
    font-size: 16px;
    font-weight: 700;
    color: #005900;
    margin: 8px 0;
}

/* ──────────────────────────────────────────── */
/* Responsive                                   */
/* ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .gato-co2-calculator {
        padding: 24px 16px;
        margin: 20px 10px;
    }

    .gato-title {
        font-size: 22px;
    }

    .gato-flight-options {
        flex-direction: column;
    }

    .gato-project-grid {
        grid-template-columns: 1fr;
    }

    .gato-buttons {
        flex-direction: column;
    }

    .gato-btn {
        text-align: center;
    }
}

/* ──────────────────────────────────────────── */
/* Stage Stepper                                  */
/* ──────────────────────────────────────────── */
.gato-stage-stepper {
    margin-bottom: 32px;
    padding: 20px 0;
}

.gato-stepper-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.gato-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: default;
    z-index: 1;
}

.gato-step.clickable {
    cursor: pointer;
}

.gato-step.clickable:hover .gato-step-circle {
    border-color: #005900;
    background: #e8f5e9;
}

.gato-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #ccc;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
}

.gato-step-number {
    font-size: 16px;
    font-weight: 700;
    color: #999;
}

.gato-step-check {
    width: 24px;
    height: 24px;
    fill: #fff;
    display: none;
}

.gato-step-label {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #999;
    text-align: center;
}

/* Completed state */
.gato-step.completed .gato-step-circle {
    border-color: #005900;
    background: #005900;
}

.gato-step.completed .gato-step-number {
    display: none;
}

.gato-step.completed .gato-step-check {
    display: block;
}

.gato-step.completed .gato-step-label {
    color: #005900;
}

/* Active state */
.gato-step.active .gato-step-circle {
    border-color: #005900;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 89, 0, 0.2);
}

.gato-step.active .gato-step-number {
    color: #005900;
}

.gato-step.active .gato-step-label {
    color: #005900;
    font-weight: 700;
}

/* Pending state */
.gato-step.pending .gato-step-circle {
    border-color: #e0e0e0;
    background: #f5f5f5;
}

.gato-step.pending .gato-step-number {
    color: #bbb;
}

.gato-step.pending .gato-step-label {
    color: #bbb;
}

/* Stepper lines */
.gato-stepper-line {
    flex: 1;
    height: 3px;
    background: #e0e0e0;
    margin: 0 -8px;
    transition: background 0.3s ease;
}

.gato-stepper-line.completed {
    background: #005900;
}

/* Stage navigation buttons */
.gato-stage-navigation {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.gato-btn-checkout {
    background: linear-gradient(135deg, #005900 0%, #3b9d2b 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 89, 0, 0.3);
}

.gato-btn-checkout:hover {
    box-shadow: 0 8px 24px rgba(0, 89, 0, 0.4);
}

/* Cart summary box */
.gato-cart-summary-box {
    background: linear-gradient(135deg, #ffffff 0%, #f5faf8 100%);
    border: 2px solid #d4e5de;
    border-radius: 16px;
    padding: 36px;
    margin-bottom: 28px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.gato-cart-summary-box h3 {
    color: #005900;
    font-size: 22px;
    font-weight: 800;
    margin-top: 0;
    margin-bottom: 24px;
}

.gato-cart-item {
    margin-bottom: 16px;
}

.gato-cart-divider {
    border: none;
    border-top: 2px solid #e0e0e0;
    margin: 20px 0;
}

.gato-cart-total {
    font-size: 20px;
    color: #2c3e3a;
    padding: 12px 0;
}

.gato-cart-total strong {
    color: #005900;
    font-size: 22px;
}

/* Responsive stepper */
@media (max-width: 768px) {
    .gato-stepper-container {
        flex-wrap: wrap;
        gap: 12px;
    }

    .gato-step-label {
        font-size: 11px;
    }

    .gato-step-circle {
        width: 32px;
        height: 32px;
    }

    .gato-step-number {
        font-size: 14px;
    }

    .gato-stepper-line {
        display: none;
    }
}
