/**
 * Car Showcase Widget Styles
 */

/* ==========================================================================
   Base Styles
   ========================================================================== */

.car-showcase {
    width: 100%;
    box-sizing: border-box;
}

.car-showcase *,
.car-showcase *::before,
.car-showcase *::after {
    box-sizing: border-box;
}

.car-showcase__inner {
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ==========================================================================
   Badge
   ========================================================================== */

.car-showcase__badge {
    display: inline-block;
    line-height: 1;
}

/* ==========================================================================
   Headline
   ========================================================================== */

.car-showcase__headline {
    width: 100%;
    padding: 0;
}

/* ==========================================================================
   Tagline
   ========================================================================== */

.car-showcase__tagline {
    width: 100%;
    padding: 0;
}

/* ==========================================================================
   Disclaimer
   ========================================================================== */

.car-showcase__disclaimer {
    width: 100%;
    padding: 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.car-showcase__buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.car-showcase__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    border-style: solid;
}

.car-showcase__button--primary {
    border-color: transparent;
}

.car-showcase__button--secondary {
    /* Secondary button styles applied via Elementor controls */
}

.car-showcase__button:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.car-showcase__button:focus:not(:focus-visible) {
    outline: none;
}

/* ==========================================================================
   Variant Tabs
   ========================================================================== */

.car-showcase__tabs {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.car-showcase__tab {
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.car-showcase__tab:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.car-showcase__tab:focus:not(:focus-visible) {
    outline: none;
}

/* ==========================================================================
   Variants Container
   ========================================================================== */

.car-showcase__variants {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.car-showcase__variant {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.car-showcase__variant.is-active {
    opacity: 1;
    visibility: visible;
    position: relative;
    pointer-events: auto;
}

/* ==========================================================================
   Car Image
   ========================================================================== */

.car-showcase__image-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.car-showcase__image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* ==========================================================================
   Content Area (Subtitle + Specs)
   ========================================================================== */

.car-showcase__content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.car-showcase__subtitle {
    text-align: center;
}

/* ==========================================================================
   Specifications
   ========================================================================== */

.car-showcase__specs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
}

.car-showcase__spec {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Vertical divider between specs */
.car-showcase__spec:not(:last-child)::after {
    content: '';
    position: absolute;
    right: calc(-20px - 0.5px); /* Half of gap minus half of divider width */
    top: 50%;
    transform: translateY(-50%);
}

.car-showcase__spec-value {
    white-space: nowrap;
}

.car-showcase__spec-label {
    white-space: nowrap;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

/* Tablet */
@media (max-width: 1024px) {
    .car-showcase__tabs {
        gap: 2px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .car-showcase__buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
    
    .car-showcase__button {
        width: 100%;
        justify-content: center;
    }
    
    .car-showcase__tabs {
        width: 100%;
        flex-direction: column;
        border-radius: 12px !important;
    }
    
    .car-showcase__tab {
        width: 100%;
        text-align: center;
    }
    
    .car-showcase__specs {
        flex-direction: column;
        align-items: center;
        gap: 20px !important;
    }
    
    .car-showcase__spec:not(:last-child)::after {
        display: none;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .car-showcase__headline {
        font-size: 28px !important;
    }
    
    .car-showcase__subtitle {
        font-size: 22px !important;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .car-showcase__variant {
        transition: none !important;
    }
    
    .car-showcase__button,
    .car-showcase__tab {
        transition: none !important;
    }
}

/* High contrast mode support */
@media (forced-colors: active) {
    .car-showcase__tab.is-active {
        border: 2px solid currentColor;
    }
    
    .car-showcase__button {
        border: 1px solid currentColor;
    }
}
