:root {
    --header-height: calc(135px + 32px);
    
    /* APE Branding Colors - Solar & Energy Palette */
    --app-primary: #1AAA68; /* Energy Green */
    --app-primary-light: #64A717; /* Lighter Green - needs to be defined if used */
    --app-secondary: #0F172A; /* Deep Solar Blue - swapping roles based on request */
    --app-secondary-dark: #0B1120;
    --app-accent: #F59E0B; /* Sun Yellow */
    --app-bg-light: #F8FAFC;
    --app-text-main: #0F172A;
    --app-text-muted: #64748B;
    --app-border: #E2E8F0;
    
    /* Typography */
    --app-font-family: 'Inter', 'Plus Jakarta Sans', sans-serif;
    
    /* Gray Scale */
    --app-gray: #707070;
    --app-gray-light: #D3D3D3;
    --app-gray-lighter: #D9D9D9;
    --app-gray-super-light: #F2F2F2;

    /* Bootstrap Overrides */
    --bs-primary: var(--app-primary);
    --bs-secondary: var(--app-secondary);
    --bs-body-bg: var(--app-bg-light);
    --bs-body-color: var(--app-text-main);
    --bs-font-sans-serif: var(--app-font-family);
}

/* APE Custom Gray Utilities */
.text-app-gray { color: #707070 !important; }
.bg-app-gray-super-light { background-color: #F2F2F2 !important; }
.border-app-gray { border-color: #707070 !important; }
.border-app-gray-light { border-color: #D3D3D3 !important; }
.border-app-gray-lighter { border-color: #D9D9D9 !important; }
.bg-app-primary-subtle { background-color: var(--app-primary-subtle) !important; }
.bg-app-gray { background-color: var(--app-bg-gray) !important; }
.bg-app-bg-gray { background-color: var(--app-bg-gray) !important; }

* {
    outline: none;
}

select.form-select {
    min-height: 48px;
}

.pointer-events-none {
    pointer-events: none;
}

.hide-pseudo-elements::before,
.hide-pseudo-elements::after {
    content: none;
}

.input-group > .form-control:focus,
.input-group > .form-floating:focus-within,
.input-group > .form-select:focus {
    z-index: 1;
}

.line-clamp {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp.line-clamp-1 {
    -webkit-line-clamp: 1;
    height: 1lh;
}

.line-clamp.line-clamp-2 {
    -webkit-line-clamp: 2;
    height: 2lh;
}

.line-clamp.line-clamp-3 {
    -webkit-line-clamp: 3;
    height: 3lh;
}

.line-clamp.line-clamp-4 {
    -webkit-line-clamp: 4;
    height: 4lh;
}

#CookiebotWidget {
    z-index: 2 !important;
}

body.modal-open #CookiebotWidget {
    z-index: -1 !important;
}

#section-page-404 .section-min-height {
    min-height: calc(100dvh - var(--header-height));
    color: #fff;
}

#section-page-breadcrumbs {
    min-height: 50dvh;
    color: #fff;
}

@media (min-width: 1024px) {
    #section-page-breadcrumbs {
        min-height: 10dvh;
    }

    .section-title-icon {
        width: 40px;
        height: 40px;
        /* border: 1px solid rgba(98, 0, 234, 0.2) */
    }
}

#section-page-404:before,
#section-page-breadcrumbs:before {
    content: '\A0';
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    background: linear-gradient(-90deg, rgba(255, 255, 255, 0) 0%, var(--app-primary) 100%);
    z-index: 1;
    pointer-events: none;
}

.section-title-icon {
    width: 30px;
    height: 30px;
    /* border: 1px solid rgba(98, 0, 234, 0.2) */
}

.listing-image-height {
    min-height: 210px;
    max-height: 210px;
}

#section-promo-seller .promo-seller {
    border: 1px solid transparent;
    transition: 0.25s ease-in-out;
}

#section-promo-seller .promo-seller:hover {
    border: 1px solid #D3D3D3;
    transition: 0.25s ease-in-out;
}

#offcanvas-categories .category-icon {
    width: 24px;
    height: 24px;
    -o-object-fit: contain;
       object-fit: contain;
}

#offcanvas-categories img.header-icon {
    filter: invert(1);
    width: 32px;
    height: 32px;
}

.autoplay-progress {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 10;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--bs-primary);
}

.autoplay-progress svg {
    --progress: 0;
    position: absolute;
    left: 0;
    top: 0px;
    z-index: 10;
    width: 100%;
    height: 100%;
    stroke-width: 4px;
    stroke: var(--bs-primary);
    fill: none;
    stroke-dashoffset: calc(125.6px * (1 - var(--progress)));
    stroke-dasharray: 125.6;
    transform: rotate(-90deg);
}

.reel-overlay .icon-avatar {
    width: 16px;
    height: 16px;
}


@media (max-width: 767px) {
    .mobile-sliders-remove-padding-end {
        padding-right: 0px !important;
    }

    .mobile-sliders-add-margin-end {
        margin-right: var(--bs-gutter-x);
    }
}


.iti {
    width: 100%;
}


.app-floating-labels {
    position: relative;
}

.app-floating-labels .form-label {
    position: absolute;
    top: 8px;
    left: 22px;
    font-size: 12px;
    z-index: 10;
}

#section-auth #authTabs {
    border-bottom: 1px solid #D3D3D3;
}

#section-auth #authTabs .nav-link {
    padding: 16px 22px;
    border-bottom: 2px solid transparent;
}

#section-auth #authTabs .nav-link.active {
    color: var(--app-secondary);
    border-bottom: 2px solid var(--app-secondary);
    filter: drop-shadow(0px 4px 20px rgba(16, 185, 129, 0.40));
}

#section-auth #authTabs .hidden-unless-active:not(.active) {
    display: none;
}

.text-line-or {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-line-or span {
    position: relative;
    z-index: 1;
    background-color: #fff;
    padding: 0 10px;
}

.text-line-or::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    width: 100%;
    height: 1px;
    border-bottom: 1px solid #D3D3D3;
}

#seller-profile-content .seller-logo,
#listing-category .seller-logo {
    min-height: 50px;
    height: 50px;
    max-height: 50px;
    min-width: 75px;
    width: 75px;
    max-width: 75px;
}

input[type="checkbox"] {
    accent-color: var(--bs-primary);
}

input[type*="password"].is-invalid + .absolute-button,
input[type*="text"].is-invalid + .absolute-button {
    margin-right: 25px !important;
}

input[type*="time"].is-invalid {
    background-position: right calc(2.375em + .1875rem) center;
}

/* Notification Badge - Red Dot Indicator */
.notification-badge {
    position: relative;
    display: inline-block;
}

.notification-badge::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background-color: var(--bs-primary);
    border-radius: 50%;
    border: 1px solid white;
}

.notification-badge-icon {
    position: relative;
    display: inline-block;
}

.notification-badge-icon::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -10px;
    width: 8px;
    height: 8px;
    background-color: var(--bs-primary);
    border-radius: 50%;
    border: 1px solid white;
}


#saved-filters-searches .listing-item-image {
    min-height: 170px;
    max-height: 170px;
}

.listing-item-image-first {
    background: #fff;
    transition: opacity 0.3s ease;
}

.listing-item-image-second {
    opacity: 0;
    z-index: 1;
    background: #fff;
    transition: opacity 0.3s ease;
}

.transition-images-hover.listing-card-link:hover .listing-item-image-first {
    opacity: 0;
}

.transition-images-hover.listing-card-link:hover .listing-item-image-second {
    opacity: 1;
}

.listing-attributes .list-horizontal-item {
    position: relative !important;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
}

.listing-attributes .list-horizontal-item::before {
    content: '';
    background-image: url('/assets/icons/listing-attributes/icon-dot.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 4px;
    height: 4px;
    margin-right: 4px;
    display: inline-block;
}

.listing-price-rating {
    min-height: 48px;
    display: flex;
    flex-direction: column;
    justify-content: end;
}

.listing-item-gallery-item {
    width: 100%;
    min-height: 210px;
    max-height: 210px;
    background-color: #f5f5f5;
    -o-object-fit: contain;
       object-fit: contain;
    -o-object-position: center;
       object-position: center;
}

@media(max-width: 768px) {
    .modal:not(#reelModal) {
        width: calc(100% - 2rem);
        margin-left: 1rem;
        margin-right: 1rem;
    }
}

#profile-listing-details .nav-tabs .nav-link.active {
    border-color: var(--bs-primary) !important;
}

@media (max-width: 992px) {

    body.app-listing-view #CookiebotWidget {
        bottom: 100px !important;
    }

    body.app-listing-view.app-listing-view-promoted #CookiebotWidget {
        bottom: 125px !important;
    }

    body.app-listing-view #floating-compare-button {
        bottom: 100px !important;
    }

    body.app-listing-view.app-listing-view-promoted #floating-compare-button {
        bottom: 125px !important;
    }

    body.app-listing-view #app-footer {
        padding-bottom: 200px !important;
    }

}