html,
body {
    scrollbar-gutter: stable both-edges !important;
    overscroll-behavior: none;
}

/* Custom list styles to override Tailwind's reset */
ol {
    list-style-type: decimal;
    padding-left: 1.5rem;
}

ul {
    list-style-type: disc;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.25rem;
}

.playfare {
    font-family: "Playfair";
}

.lato {
    font-family: "Lato", sans-serif;
}

.cubic-transition {
    transition-property: background-color, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 500ms;
}

.menu-transition {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 500ms;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background-color: #c5c5c5;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background-color: #505050;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.active-category {
    color: #ff5757 !important; /* brand-red */
}

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: #428a84b3;
    font-weight: 600;
    color: white;
    text-align: center;
    padding: 5px 0;
    border-radius: 6px;

    position: absolute;
    z-index: 1;

    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip .tooltip-text.visible {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.3s;
}

.modal-container {
    background-color: rgba(0, 0, 0, 0.562);
}

.card__image {
    height: 12rem;
    width: 100%;
}

@media (min-width: 600px) {
    .card__image {
        max-height: none;
    }

    .card__image img {
        height: 100%;
    }
}

.balance {
    text-wrap: balance;
}

@keyframes pulse-subtle {
    0%,
    23.07% {
        transform: scale(1);
        opacity: 1;
    }

    11.54% {
        transform: scale(1.03);
        opacity: 0.95;
    }

    23.07%,
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.selected {
    border: none;
    background-color: transparent;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 3px;
    text-decoration-style: solid;
    text-decoration-color: #ff5758;
}

.not-selected:hover {
    transform: scale(1.05);
}

.other-locales {
    transition:
        transform 0.5s ease,
        opacity 0.5s ease;
    transform-origin: bottom;
    opacity: 0;
    transform: scaleY(0);
}

.other-locales.active {
    opacity: 1;
    transform: scaleY(1);
}

/* Skeleton */

.skeleton {
    position: relative;
    overflow: hidden;
    border-radius: 0.375rem;
}

.skeleton-img {
    border-radius: 0;
}

.skeleton img {
    opacity: 0;
    transition: opacity 1s ease-out;
}

.skeleton.loaded img {
    opacity: 1;
}

.skeleton::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    z-index: 10;
    background: linear-gradient(
        90deg,
        transparent 20%,
        rgba(255, 255, 255, 0.7) 50%,
        transparent 80%
    );
    background-color: #e5e7eb;
    background-size: 200% 100%;
    animation: skeleton-shimmer 2.5s infinite ease-in-out;
    border-radius: inherit;
}

.dark .skeleton::before {
    background: linear-gradient(
        90deg,
        transparent 20%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 80%
    );
    background-color: #262d38;
    background-size: 200% 100%;
    animation: skeleton-shimmer 2.5s infinite ease-in-out;
    right: 0;
    bottom: 0;
    min-height: 100%;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

select:disabled {
    background-color: #e0e0e0;
    color: #a0a0a0;
    opacity: 0.3;
}

.fixed-menu {
    @apply dark:shadow-white;

    position: fixed;
    top: 0;
    z-index: 10;
    width: 100%;
    max-width: 42rem;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.25),
        0 2px 4px -1px rgba(0, 0, 0, 0.343);
}

.scrollbar-hide::-webkit-scrollbar {
    display: none; /* Para navegadores basados en WebKit */
}

.scrollbar-hide {
    -ms-overflow-style: none; /* Para Internet Explorer */
    scrollbar-width: none; /* Para Firefox */
}

.open-filter {
    height: calc-size(auto);
}

.spinner {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #ccc;
    border-top-color: #000;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

summary.lexxy-editor__toolbar-button {
    display: flex;
    justify-content: center;
}

.dark #menu_description-content {
    color: #fff;
}

/* Hide code block button from lexxy toolbar */
button.lexxy-editor__toolbar-button[name="upload"],
button.lexxy-editor__toolbar-button[name="code"] {
    display: none !important;
}

/* =============================================================================
   ScrollSpy: Smooth scroll with offset for sticky header
   ============================================================================= */

/**
 * scroll-margin-top creates space above the element when scrolling to it.
 * This prevents the sticky header from covering the content.
 *
 * The value should match or exceed the sticky header height.
 * Using a CSS custom property allows easy adjustment.
 */
:root {
    --navbar-height: 180px; /* Approximate height of sticky navbar */
}

.category-header {
    scroll-margin-top: var(--navbar-height);
}

/* Smooth scrolling for the entire document */
html {
    scroll-behavior: smooth;
}

.stable {
    scrollbar-gutter: stable both-edges !important;
}

/* =============================================================================
   Status Dropdown Morphing
   ============================================================================= */

.status-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.status-dropdown-trigger {
    position: relative;
}

.status-dropdown-menu {
    z-index: 9999;
    width: 130px;
    border-radius: 12px;
    overflow: hidden;
    pointer-events: none;

    /* Estado inicial */
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
    transform-origin: top left;

    /* Transición suave estilo Linear/Vercel */
    transition:
        opacity 0.15s ease,
        transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Estado abierto */
.status-dropdown-menu.status-dropdown-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Contenido interno - stagger sutil en los items */
.status-dropdown-content {
    display: flex;
    flex-direction: column;
    padding: 6px;
    gap: 2px;
}

.status-dropdown-content > a {
    opacity: 0;
    transform: translateX(-6px);
    transition:
        opacity 0.15s ease,
        transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.status-dropdown-open .status-dropdown-content > a {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger effect para cada item */
.status-dropdown-open .status-dropdown-content > a:nth-child(1) {
    transition-delay: 0.02s;
}
.status-dropdown-open .status-dropdown-content > a:nth-child(2) {
    transition-delay: 0.05s;
}
.status-dropdown-open .status-dropdown-content > a:nth-child(3) {
    transition-delay: 0.08s;
}

/* =============================================================================
   Prose Menu: Styled rich text content for menu descriptions
   ============================================================================= */

.prose-menu p {
    margin-bottom: 0.75rem;
}

.prose-menu p:last-child {
    margin-bottom: 0;
}

.prose-menu ul,
.prose-menu ol {
    list-style: none;
    padding-left: 0;
    margin: 0.75rem 0;
    display: inline-block;
    text-align: left;
}

.prose-menu li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.375rem;
}

.prose-menu li:last-child {
    margin-bottom: 0;
}

/* Elegant bullet: small centered dot */
.prose-menu ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: currentColor;
    opacity: 0.4;
}

/* Ordered list numbers */
.prose-menu ol {
    counter-reset: prose-counter;
}

.prose-menu ol li::before {
    counter-increment: prose-counter;
    content: counter(prose-counter) ".";
    position: absolute;
    left: 0;
    opacity: 0.5;
    font-size: 0.875em;
}

.prose-menu strong,
.prose-menu b {
    font-weight: 500;
}

.prose-menu em,
.prose-menu i {
    font-style: italic;
}

/* =============================================================================
   Menu Info Popover
   ============================================================================= */

[data-menu-info-popover-target="popover"] {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
    transition:
        opacity 0.15s ease,
        transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-menu-info-popover-target="popover"].menu-popover-open {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Prose styles specific to the menu info popover */
.prose-menu-popover ul,
.prose-menu-popover ol {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.prose-menu-popover li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.25rem;
    font-weight: 300;
}

.prose-menu-popover li:last-child {
    margin-bottom: 0;
}

.prose-menu-popover ul li::before {
    content: "·";
    position: absolute;
    left: 0;
    font-weight: 700;
    opacity: 0.5;
}

.prose-menu-popover p {
    margin: 0;
    font-weight: 300;
}

.prose-menu-popover p:has(+ ul),
.prose-menu-popover p:has(+ ol) {
    margin-bottom: 0.5rem;
}
