@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap");

:root {
    --color-primary: #41C4C3;
    --bg-image: url("https://template-assets.tebex.io/images/page-bg.jpg");
    --color-bg: #4dd0e1;
    --color-brighter-bg: #5dd8e8;
}
body {
    font-family: Lato, sans-serif;
}

.btn-primary,
.btn-secondary,
.btn-tertiary {
    border-radius: 2px;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-secondary:hover,
.btn-secondary:focus {
    box-shadow: none;
}

.quantity-field {
    border-radius: 5px;
}

.site-header-inner .info .image {
    border-radius: 5px;
}

.site-sale-banner {
    border-radius: 5px;
}

.site-home-categories .category {
    border-radius: 5px;
    padding: 20px var(--widget-padding);
    background: var(--color-brighter-bg);
    transition: color 0.15s ease-in-out;
}

.site-home-categories .category:hover {
    color: var(--color-primary);
}

.category-description {
    border-radius: 5px;
    background: var(--color-brighter-bg);
}

.store-text {
    border-radius: 5px;
    background: var(--color-brighter-bg);
}

.store-text h1,
.store-text h2,
.store-text h3,
.store-text h4,
.store-text h5,
.store-text h6 {
    text-align: center;
}

.store-products-list .store-product,
.store-products-images .store-product {
    border-radius: 5px;
    background: var(--color-brighter-bg);
}

.store-products-images .store-product {
    text-align: center;
}

.widget-title {
    text-align: center;
}

.widget .store-product {
    text-align: center;
}

.no-products {
    color: var(--color-text-secondary);
    background: var(--color-brighter-bg);
    border-radius: 5px;
}

.store-product-full {
    border-radius: 5px;
    background: var(--color-brighter-bg);
}

.store-product .quantity-field {
    border-radius: 5px;
    background: var(--color-brighter-bg);
}

.store-product .quantity-field input[type=number] {
    border: none;
}

@media (width > 960px) {
    .navigation-horizontal>ul {
        border-radius: 0;
    }

    .navigation-horizontal .menu {
        background: transparent;
        justify-content: flex-start;
        padding: 0;
        gap: 8px;
    }

    .navigation-horizontal .menu>li>a {
        padding: 14px 12px;
    }
}

.navigation-horizontal .has-children>ul {
    border-radius: 5px;
}

.widget {
    border-radius: 5px;
    background: var(--color-brighter-bg);
}

@media (width <=960px) {
    .widget.site-navigation {
        border-radius: 0;
        background: transparent;
    }
}

.widget-gift-card .gift-card-input {
    border-radius: 2px;
}

.widget-top-donator .avatar {
    border-radius: 50%;
}

.widget-community-goal .progress,
.widget-goal .progress {
    border-radius: 2px;
}

.widget-community-goal .progress-bar,
.widget-goal .progress-bar {
    border-radius: 2px;
}

.popup-content {
    border-radius: 5px;
}

.popup-close {
    border-radius: 0 5px 0 5px;
}

.basket-popup-content,
.basket-popup-content .popup-close {
    border-radius: 0;
}

.basket-items {
    padding: var(--widget-padding) calc(var(--content-padding) - var(--widget-padding));
}

.basket-item {
    border-radius: 5px;
}

.basket-item .quantity {
    border-radius: 2px;
}

.toast {
    border-radius: 6px;
}

.toast-close {
    border-radius: 2px;
}

.store-category-tiered {
    border-radius: 5px;
    background: var(--color-brighter-bg);
}

.store-category-tiered-header h1,
.store-category-tiered-header h2,
.store-category-tiered-header h3,
.store-category-tiered-header h4,
.store-category-tiered-header h5,
.store-category-tiered-header h6 {
    text-align: center;
}

.store-product-tiered {
    border-radius: 5px;
    background: rgb(from var(--color-bg) r g b/0.5);
}

.media-slider .slider,
.media-slider .thumb {
    border-radius: 5px;
}

.media-slider .open-lightbox {
    border-radius: 2px;
}

.popup.popup-media-slider .thumb {
    border-radius: 5px;
}

.popup.popup-media-slider .popup-close {
    border-radius: 5px;
}

@media (width > 960px) {
    .site-header-inner {
        height: auto !important;
        display: flex;
        align-items: center;
        gap: 24px;
        padding: 16px 0;
    }

    body.is-navigation-horizontal .site-header-inner {
        height: auto !important;
    }

    .site-header-inner .site-title {
        position: static;
        inset: auto;
        width: auto;
        font-size: 22px;
        line-height: normal;
        flex: none;
    }

    .site-header-inner .toggle-navigation {
        display: none;
    }

    .site-header-inner .actions,
    .site-header-inner .log-in,
    .site-header-inner .user-actions {
        position: static;
    }

    .site-header-inner .log-in,
    .site-header-inner .user-actions {
        margin-left: auto;
    }

    /* Make the nav sit inline and take up remaining space */
    .site-header-inner .site-navigation {
        flex: 1;
    }

    .navigation-horizontal .menu {
        background: transparent;
        padding: 0;
        gap: 4px;
        justify-content: flex-start;
    }

    .navigation-horizontal .menu>li>a {
        padding: 8px 12px;
    }

    .site-header-inner .info {
        position: static;
        max-width: none;
        width: auto;
    }
}

@media (width > 960px) {
    .site-header-inner .site-title {
        font-size: 18px;
    }

    .site-header-inner .log-in,
    .site-header-inner .user-actions .btn-secondary {
        font-size: 18px;
    }
}

@media (width > 960px) {
    .site-header-inner .site-title {
        font-size: 18px !important;
        font-weight: 700;
        line-height: normal;
    }

    .site-header-inner .log-in {
        font-size: 18px !important;
        font-weight: 700;
    }
}

.site-content-widgets {
    display: block !important;
}

@media (width <=960px) {
    .site-header-inner {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        padding: 16px 0 !important;
        gap: 12px !important;
        flex-wrap: nowrap !important;
    }

    .site-header-inner .site-title {
        position: static !important;
        width: auto !important;
        line-height: normal !important;
        font-size: 18px !important;
        font-weight: 700 !important;
        text-align: left !important;
        order: 2;
    }

    .site-header-inner .actions {
        position: static !important;
        order: 1;
    }

    .site-header-inner .log-in,
    .site-header-inner .user-actions {
        position: static !important;
        order: 3;
        margin-left: auto;
    }

    .site-header-inner .info {
        display: none;
    }
}

/* Always white nav text, animated underline on hover */
.navigation-horizontal .menu a {
    color: #fff !important;
    position: relative;
    padding-bottom: 4px;
}

.navigation-horizontal .menu a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    right: 50%;
    height: 2px;
    background: #fff;
    transition: left 0.2s ease, right 0.2s ease;
}

.navigation-horizontal .menu a:hover::after,
.navigation-horizontal .menu a.active::after,
.navigation-horizontal .menu a.link-active::after {
    left: 0;
    right: 0;
}

.navigation-horizontal .menu a:hover,
.navigation-horizontal .menu a.active,
.navigation-horizontal .menu a.link-active {
    color: #fff !important;
}

/* Custom Button Override: White border, transparent background, white text -> Hover fills white with aqua text */
/* Excludes: .log-in, .toggle-navigation (hamburger), and .close-navigation (mobile X close) */
.btn-primary:not(.log-in):not(.toggle-navigation):not(.close-navigation),
.btn-secondary:not(.log-in):not(.toggle-navigation):not(.close-navigation),
.btn-tertiary:not(.log-in):not(.toggle-navigation):not(.close-navigation) {
    --btn-color-bg: transparent !important;
    --btn-color-text: #ffffff !important;
    --btn-color-bg-hover: #ffffff !important;
    --btn-color-text-hover: var(--color-bg) !important;

    background-color: transparent !important;
    color: #ffffff !important;
    border: 2px solid #ffffff !important;

    /* Adjusts the line-height to match the inner height inside the borders */
    line-height: calc(var(--btn-size) - 4px) !important;

    transition: all 0.2s ease-in-out !important;
}

.btn-primary:not(.log-in):not(.toggle-navigation):not(.close-navigation):hover,
.btn-primary:not(.log-in):not(.toggle-navigation):not(.close-navigation):focus,
.btn-secondary:not(.log-in):not(.toggle-navigation):not(.close-navigation):hover,
.btn-secondary:not(.log-in):not(.toggle-navigation):not(.close-navigation):focus,
.btn-tertiary:not(.log-in):not(.toggle-navigation):not(.close-navigation):hover,
.btn-tertiary:not(.log-in):not(.toggle-navigation):not(.close-navigation):focus {
    background-color: #ffffff !important;
    color: var(--color-bg) !important;
    border-color: #ffffff !important;
}

/* Login popup input field: white background and black text */
.login-popup input[type=text],
.login-popup-content input[type=text],
.store-form input[type=text] {
    background-color: #ffffff !important;
    color: #000000 !important;
}

/* Ensure placeholder text is readable on the white background */
.login-popup input[type=text]::placeholder,
.login-popup-content input[type=text]::placeholder,
.store-form input[type=text]::placeholder {
    color: #666666 !important;
    opacity: 1 !important;
}

/* Make all footer text, copyright notices, and legal links white */
.site-footer,
.site-footer-inner,
.site-footer-inner .copyright,
.site-footer-inner .site-footer-nav a,
.site-footer-credit,
.site-footer-credit .copyright,
.site-footer-credit .legal a {
    color: #ffffff !important;
}

/* Force the Tebex logo PNG/SVG to be pure white */
.tebex-logo-link img,
.tebex-logo-link svg {
    filter: brightness(0) invert(1) !important;
    opacity: 1 !important;
}

/* Make the navigation underline animation ends rounded */
.navigation-horizontal .menu a::after {
    border-radius: 2px !important;
}

.store-product .product-title a:hover,
.store-product .image-link:hover~.product-title a {
    color: inherit !important;
}

.store-product .descr {
    color: #ffffff !important;
}

/* Product Title Animated Underline */
.store-product .product-title a {
    position: relative;
    display: inline-block;
    padding-bottom: 4px;
}

.store-product .product-title a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    right: 50%;
    height: 2px;
    background: #ffffff;
    transition: left 0.2s ease, right 0.2s ease;
    border-radius: 2px !important;
}

.store-product .product-title a:hover::after,
.store-product .image-link:hover~.product-title a::after {
    left: 0;
    right: 0;
}

tebex-footer {
    --tebex-legal-footer-text-color: #ffffff !important;
}

/* Custom styling for the Login button - matching the header login hover style */
.btn-primary.log-in {
    background-color: transparent !important;
    border: none !important;
    color: #ffffff !important;
    line-height: var(--btn-size) !important;
    transition: all 0.2s ease-in-out !important;
}

.btn-primary.log-in:hover,
.btn-primary.log-in:focus {
    /* Matches the btn-tertiary hover background exactly */
    background-color: rgb(255 255 255 / 15%) !important;
    color: #ffffff !important;
}

/* Restrict mobile navigation underlines to the width of the text */
.navigation-horizontal .menu a,
.site-navigation .menu a {
    display: inline-block !important;
    width: fit-content !important;
}

@media (width > 960px) {

    /* Align size and center contents of the desktop username button */
    .site-header-inner .user-name {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 16px !important;
        /* Matches standard Basket button font size */
        font-weight: 700 !important;
    }

    .site-header-inner .user-name .text-inner {
        display: block !important;
        height: calc(var(--btn-size) - 4px) !important;
        width: 100% !important;
    }

    .site-header-inner .user-name .text,
    .site-header-inner .user-name .text-hover {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: calc(var(--btn-size) - 4px) !important;
        line-height: normal !important;
    }

    /* Adjusts the margin shift to match the precise inner button height */
    .site-header-inner .user-name .text-hover {
        margin-top: calc((var(--btn-size) - 4px) * -1) !important;
    }
}

/* Disable the default, off-center parent level spinner */
.store-product .actions.updating::before,
.store-product-options .actions.updating::before {
    display: none !important;
}

/* Set positioning context on the active buttons during an update */
.store-product .actions.updating .btn-primary,
.store-product .actions.updating .quantity-field,
.store-product-options .actions.updating .btn-primary,
.store-product-options .actions.updating .quantity-field {
    position: relative !important;
}

/* Render the spinner precisely centered over the button or quantity element */
.store-product .actions.updating .btn-primary::before,
.store-product .actions.updating .quantity-field::before,
.store-product-options .actions.updating .btn-primary::before,
.store-product-options .actions.updating .quantity-field::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    width: 30px !important;
    height: 30px !important;
    transform: translate(-50%, -50%) !important;
    z-index: 100 !important;
    background-color: var(--color-text) !important;
    mask: url("https://template-assets.tebex.io/images/loading.svg") center center/contain no-repeat !important;
    -webkit-mask: url("https://template-assets.tebex.io/images/loading.svg") center center/contain no-repeat !important;
}

/* Raise the header stacking context when mobile navigation is open */
body.show-navigation .site-header {
    z-index: 999999 !important;
}

/* Prevent the parent button/field from losing opacity so the spinner renders at 100% solid white */
.store-product .actions.updating .btn-primary,
.store-product .actions.updating .quantity-field,
.store-product-options .actions.updating .btn-primary,
.store-product-options .actions.updating .quantity-field {
    opacity: 1 !important;
    filter: none !important;
}

/* Manually fade only the button text and borders to maintain the "updating" appearance */
.store-product .actions.updating .btn-primary,
.store-product-options .actions.updating .btn-primary {
    color: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    background-color: transparent !important;
}

/* Manually fade the quantity field borders and text */
.store-product .actions.updating .quantity-field,
.store-product-options .actions.updating .quantity-field {
    color: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.store-product .actions.updating .quantity-field input,
.store-product-options .actions.updating .quantity-field input {
    opacity: 0.3 !important;
}

/* Custom full-box category layout */
.site-home-categories .category.category-card-custom {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    align-items: flex-start !important;
    text-align: left !important;

    min-height: 250px;
    /* Adjust this value to make the box taller or shorter */
    position: relative;
    overflow: hidden;
    padding: 24px !important;

    /* Layout styling overrides */
    background-color: var(--color-brighter-bg) !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;

    /* Merges gradient overlay with the dynamic background image */
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0) 100%), var(--category-bg) !important;

    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: transform 0.2s ease-in-out, border-color 0.2s ease-in-out !important;
}

/* Hover effects for the image card */
.site-home-categories .category.category-card-custom:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

/* Category name text tag styles */
.site-home-categories .category.category-card-custom .category-name-tag {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff !important;
    line-height: normal;
    z-index: 2;
}

/* 1. Fix desktop title alignment (force left alignment without nav elements) */
@media (width > 960px) {
    .site-header-inner .site-title {
        position: static !important;
        text-align: left !important;
        margin: 0 !important;
        width: auto !important;
        inset: auto !important;
    }
}

/* 2. Style the new Mobile Logout glyph button */
.mobile-logout {
    --btn-icon: url("https://template-assets.tebex.io/images/log-out.svg") !important;
    border-radius: 2px !important;
}

/* Force the icon inside the glyph to follow the precise text colors */
.mobile-logout::before {
    background-color: var(--btn-color-text) !important;
}

.mobile-logout:hover::before,
.mobile-logout:focus::before {
    background-color: var(--btn-color-text-hover) !important;
}

/* Header Brand Group (Aligns title and IP pill side-by-side) */
.header-brand-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

@media (width > 960px) {
    .site-header-inner .header-brand-group {
        position: static !important;
        margin: 0 !important;
        width: auto !important;
        inset: auto !important;
    }

    .site-header-inner .site-title {
        position: static !important;
        text-align: left !important;
        margin: 0 !important;
        width: auto !important;
        inset: auto !important;
    }
}

/* Header Brand Group (Aligns title/logo and IP pill side-by-side) */
.header-brand-group {
    display: flex;
    align-items: center;
    gap: 18px;
}

/* Force logo to scale proportionately and prevent stretching */
.site-header-inner .site-title img {
    height: auto !important;
    object-fit: contain !important;
}

@media (width > 960px) {
    .site-header-inner .header-brand-group {
        position: static !important;
        margin: 0 !important;
        width: auto !important;
        inset: auto !important;
    }

    .site-header-inner .site-title {
        position: static !important;
        text-align: left !important;
        margin: 0 !important;
        width: auto !important;
        inset: auto !important;
        font-size: 26px !important;
        font-weight: 700;
        line-height: normal;
    }

    /* Restrict desktop logo height to fit nicely inside the inline row */
    .site-header-inner .site-title img {
        max-height: 55px !important;
    }
}

@media (width <=960px) {
    .site-header-inner .site-title {
        position: static !important;
        width: auto !important;
        line-height: normal !important;
        font-size: 22px !important;
        font-weight: 700 !important;
        text-align: left !important;
        order: unset !important;
    }

    /* Restrict mobile logo height to keep the compact layout aligned */
    .site-header-inner .site-title img {
        max-height: 42px !important;
    }
}

/* Copy IP Pill Container (Pure White Background) */
.ip-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #ffffff !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 11px 24px !important;
    cursor: pointer;
    user-select: none;
    transition: transform 0.1s ease-in-out !important;
}

/* Active press scale animation (Preserved on all screen sizes) */
.ip-pill:active {
    transform: scale(0.96) !important;
}

/* Vector Copy Icon styling */
.ip-pill .copy-icon {
    width: 18px;
    height: 18px;
    fill: #4dd0e1 !important;
}

/* IP text formatting */
.ip-pill .ip-text {
    font-size: 16px !important;
    font-weight: 900 !important;
    color: #4dd0e1 !important;
    letter-spacing: 0.5px !important;
    line-height: normal !important;
}

/* On small screens, collapse the pill into a white circle containing only the icon */
@media (max-width: 600px) {
    .ip-pill {
        width: 42px !important;
        height: 42px !important;
        padding: 0 !important;
        justify-content: center !important;
        border-radius: 50% !important;
        gap: 0 !important;
        flex-shrink: 0 !important;
    }

    .ip-pill .ip-text {
        display: none !important;
    }

    .ip-pill .copy-icon {
        width: 18px !important;
        height: 18px !important;
    }
}

/* Force prices and totals to be white in the basket */
.basket-second-header .total,
.basket-item .price,
.basket-checkout h3 .total {
    color: #ffffff !important;
}

/* Ensure the currency symbol and price text within the price component are also white */
.basket-second-header .total strong,
.basket-item .price strong,
.basket-checkout h3 .total strong {
    color: #ffffff !important;
}

/* Optional: Make the labels for "Total" and "Items" white too */
.basket-checkout h3,
.basket-second-header .count {
    color: #ffffff !important;
}

/* Update the header to match the lighter product box color */
.basket-header {
    background-color: var(--color-brighter-bg) !important;
}

/* Optional: If there is a dark line/border between the header and the items list, remove it: */
.basket-header {
    border-bottom: none !important;
}