/**
 * Elementor Post Switcher - Dropdown & Sticky Styles
 */

.eps-widget-wrapper {
    position: relative;
    width: 100%;
}

/* Sticky Header Container */
.eps-sticky-wrapper {
    width: 100%;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

.eps-sticky-wrapper.eps-sticky-enabled {
    position: -webkit-sticky;
    position: sticky;
    top: var(--eps-sticky-offset, 20px);
    z-index: var(--eps-sticky-zindex, 99);
}

.eps-sticky-wrapper.eps-sticky-enabled.eps-is-stuck {
    background-color: var(--eps-sticky-bg, rgba(255, 255, 255, 0.95));
    backdrop-filter: var(--eps-sticky-blur, blur(10px));
    -webkit-backdrop-filter: var(--eps-sticky-blur, blur(10px));
    box-shadow: var(--eps-sticky-shadow, 0 8px 24px rgba(0, 0, 0, 0.08));
    padding: 12px 16px;
    border-radius: var(--eps-sticky-radius, 12px);
    margin-bottom: 20px;
}

/* Switcher Row / Header Container */
.eps-switcher-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    transition: all 0.25s ease;
}

.eps-align-left {
    justify-content: flex-start;
}

.eps-align-center {
    justify-content: center;
}

.eps-align-right {
    justify-content: flex-end;
}

.eps-align-justify {
    justify-content: stretch;
}

.eps-align-justify .eps-dropdown-wrapper {
    flex: 1 1 100%;
    width: 100%;
}

/* Prefix Label */
.eps-prefix-label {
    display: inline-flex;
    align-items: center;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    margin: 0;
}

/* Dropdown Wrapper */
.eps-dropdown-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 240px;
    max-width: 100%;
}

/* Select Control */
.eps-post-dropdown {
    width: 100%;
    height: auto;
    padding: 12px 44px 12px 16px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    color: #1e293b;
    background-color: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.eps-post-dropdown:hover {
    border-color: #94a3b8;
    background-color: #f8fafc;
}

.eps-post-dropdown:focus {
    border-color: #2563eb;
    background-color: #ffffff;
    box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.18);
}

/* Custom Dropdown Arrow */
.eps-dropdown-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 6px;
    background-color: var(--eps-arrow-color, #64748b);
    clip-path: polygon(100% 0%, 0 0%, 50% 100%);
    pointer-events: none;
    transition: transform 0.25s ease, background-color 0.25s ease;
}

.eps-dropdown-wrapper:hover .eps-dropdown-arrow {
    background-color: var(--eps-arrow-hover-color, #1e293b);
}

/* Content Output Container */
.eps-template-output {
    position: relative;
    min-height: 80px;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.eps-template-output.eps-loading {
    opacity: 0.4;
    pointer-events: none;
}

/* Spinner Overlay */
.eps-spinner-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.eps-template-output.eps-loading .eps-spinner-overlay {
    display: flex;
}

.eps-spinner {
    width: 36px;
    height: 36px;
    border: 3.5px solid rgba(226, 232, 240, 0.8);
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: eps-spin 0.75s linear infinite;
}

@keyframes eps-spin {
    to {
        transform: rotate(360deg);
    }
}

.eps-error-message {
    padding: 16px 20px;
    background-color: #fef2f2;
    border: 1px solid #fee2e2;
    border-radius: 10px;
    color: #dc2626;
    font-size: 14px;
    line-height: 1.5;
}

/* In-Card Variant Sub-Switcher */
.eps-variant-toggle-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 8px 0 16px 0;
}

.eps-variant-toggle-wrapper {
    display: inline-flex;
    align-items: center;
    background: #edf2f7;
    padding: 4px;
    border-radius: 30px;
    width: 100%;
    max-width: 320px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.eps-variant-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #64748b;
    background: transparent;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    user-select: none;
}

.eps-variant-btn:hover {
    color: #0f172a;
}

.eps-variant-btn.eps-active {
    background: #0f172a;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

.eps-val-updating {
    opacity: 0.25;
    transform: translateY(-2px);
    transition: all 0.12s ease;
}

/* Responsive Sticky Disables */
@media (max-width: 1024px) {
    .eps-sticky-disable-tablet.eps-sticky-enabled {
        position: relative !important;
        top: auto !important;
    }
}

@media (max-width: 767px) {
    .eps-sticky-disable-mobile.eps-sticky-enabled {
        position: relative !important;
        top: auto !important;
    }
}

/* Featured Vehicle Image Styling & Uniform Containment */
.eps-template-output .elementor-widget-image {
    width: 100%;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin-bottom: 12px !important;
}

.eps-template-output .elementor-widget-image .elementor-widget-container {
    width: 100%;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.eps-template-output .elementor-widget-image img {
    height: 190px !important;
    max-height: 190px !important;
    width: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    margin: 0 auto !important;
    display: block !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.eps-template-output .elementor-widget-image:hover img {
    transform: scale(1.04);
}

@media (max-width: 767px) {
    .eps-template-output .elementor-widget-image img {
        height: 160px !important;
        max-height: 160px !important;
    }
}
