/* Skeleton loader — layout-matched placeholders, existing brand colors only */

:root {
    --skel-base: #1E1E1E;
    --skel-highlight: #2A2A2A;
    --skel-shimmer: rgba(245, 158, 11, 0.06);
}

html.is-skeleton-active {
    overflow: auto;
}

html.is-skeleton-active .preloader {
    display: none !important;
}

.mophyz-skeleton {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: #121212;
    overflow-y: auto;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.mophyz-skeleton.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.skel-block {
    background: var(--skel-base);
    border-radius: 8px;
}

.skel-block--circle {
    border-radius: 9999px;
}

.skel-block--pill {
    border-radius: 9999px;
}

.skel-block--rounded-lg {
    border-radius: 12px;
}

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

.skel-container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 1024px) {
    .skel-container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* ─── Shared header (dual bar) ─── */
.skel-top-bar {
    background: rgba(30, 30, 30, 0.95);
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

@media (min-width: 1024px) {
    .skel-top-bar { padding: 0.5rem 2rem; }
}

.skel-top-bar__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skel-top-bar__info {
    display: none;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .skel-top-bar__info { display: flex; }
}

.skel-top-bar__social {
    display: flex;
    gap: 1rem;
}

.skel-main-nav {
    background: rgba(18, 18, 18, 0.98);
    padding: 1rem;
    border-bottom: 1px solid rgba(245, 158, 11, 0.06);
}

@media (min-width: 1024px) {
    .skel-main-nav { padding: 1rem 2rem; }
}

.skel-main-nav__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skel-logo {
    width: 64px;
    height: 64px;
}

.skel-nav-links {
    display: none;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 768px) {
    .skel-nav-links { display: flex; }
}

.skel-nav-link {
    width: 72px;
    height: 14px;
}

.skel-nav-link--wide { width: 48px; }
.skel-nav-link--cart { width: 56px; height: 20px; }

.skel-hamburger {
    width: 30px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

@media (min-width: 768px) {
    .skel-hamburger { display: none; }
}

.skel-hamburger span {
    display: block;
    height: 2px;
    background: #444;
    border-radius: 2px;
}

/* ─── Marketing / Home hero ─── */
.skel-hero {
    position: relative;
    padding-top: 6rem;
    padding-bottom: 3rem;
}

.skel-hero--fullscreen {
    min-height: 100vh;
    padding: 0;
}

.skel-hero__bg {
    position: absolute;
    inset: 0;
}

.skel-hero__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: inherit;
    padding: 6rem 1rem 3rem;
    text-align: center;
}

.skel-hero__title {
    width: min(90%, 520px);
    height: 48px;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .skel-hero__title { height: 56px; }
}

.skel-hero__subtitle {
    width: min(80%, 380px);
    height: 18px;
    margin-bottom: 2rem;
}

.skel-hero__buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 320px;
}

@media (min-width: 640px) {
    .skel-hero__buttons {
        flex-direction: row;
        max-width: none;
        justify-content: center;
    }
}

.skel-btn {
    height: 48px;
    flex: 1;
    max-width: 200px;
}

/* ─── Section blocks ─── */
.skel-section {
    padding: 5rem 0;
}

.skel-section-title {
    width: 240px;
    height: 32px;
    margin: 0 auto 3rem;
}

.skel-grid-3 {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .skel-grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.skel-card {
    padding: 1.5rem;
    background: rgba(30, 30, 30, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.skel-card__image {
    width: 100%;
    height: 200px;
    margin-bottom: 1rem;
    border-radius: 12px;
}

.skel-card__title {
    width: 70%;
    height: 18px;
    margin-bottom: 0.75rem;
}

.skel-card__line {
    width: 100%;
    height: 12px;
    margin-bottom: 0.5rem;
}

.skel-card__line--short { width: 45%; }

/* ─── Menu grid (matches menu-item cards) ─── */
.skel-menu-hero {
    padding-top: 6rem;
    padding-bottom: 3rem;
    min-height: 220px;
}

.skel-menu-hero__title {
    width: 280px;
    height: 40px;
    margin: 0 auto 1rem;
}

.skel-menu-hero__sub {
    width: 360px;
    max-width: 90%;
    height: 16px;
    margin: 0 auto;
}

.skel-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    padding: 0 0.5rem;
}

@media (min-width: 768px) {
    .skel-menu-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        padding: 0 1rem;
    }
}

@media (min-width: 1024px) {
    .skel-menu-grid { grid-template-columns: repeat(4, 1fr); }
}

.skel-menu-item {
    padding: 1rem;
    background: rgba(42, 42, 42, 0.7);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

@media (min-width: 640px) {
    .skel-menu-item { padding: 1.5rem; }
}

.skel-menu-item__img {
    width: 100%;
    height: 7rem;
    margin-bottom: 0.75rem;
    border-radius: 12px;
}

@media (min-width: 640px) {
    .skel-menu-item__img { height: 9rem; }
}

@media (min-width: 768px) {
    .skel-menu-item__img { height: 12rem; }
}

.skel-menu-item__title {
    width: 75%;
    height: 16px;
    margin-bottom: 0.5rem;
}

.skel-menu-item__desc {
    width: 100%;
    height: 10px;
    margin-bottom: 0.35rem;
}

.skel-menu-item__price {
    width: 40%;
    height: 14px;
    margin: 0.75rem 0 1.5rem;
}

.skel-menu-item__btn {
    width: 100%;
    height: 40px;
    border-radius: 9999px;
}

/* ─── Footer skeleton ─── */
.skel-footer {
    background: #1E1E1E;
    padding: 4rem 0 2rem;
    margin-top: auto;
    border-top: 1px solid rgba(245, 158, 11, 0.06);
}

.skel-footer-grid {
    display: grid;
    gap: 2.5rem;
    grid-template-columns: 1fr;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .skel-footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .skel-footer-grid { grid-template-columns: repeat(4, 1fr); }
}

.skel-footer__brand {
    width: 180px;
    height: 28px;
    margin-bottom: 1rem;
}

.skel-footer__line {
    width: 100%;
    height: 10px;
    margin-bottom: 0.5rem;
}

.skel-footer__heading {
    width: 100px;
    height: 18px;
    margin-bottom: 1.5rem;
}

/* ─── Royalties app layout ─── */
.skel-royalties {
    display: flex;
    min-height: 100vh;
    background: #1A1A1A;
}

.skel-royalties-sidebar {
    display: none;
    width: 16rem;
    flex-shrink: 0;
    background: #2A2A2A;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .skel-royalties-sidebar { display: flex; flex-direction: column; }
}

.skel-royalties-sidebar__logo {
    width: 140px;
    height: 24px;
    margin-bottom: 2rem;
}

.skel-royalties-nav-item {
    width: 100%;
    height: 44px;
    margin-bottom: 0.5rem;
    border-radius: 8px;
}

.skel-royalties-mobile-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #2A2A2A;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
}

@media (min-width: 768px) {
    .skel-royalties-mobile-bar { display: none; }
}

.skel-royalties-main {
    flex: 1;
    padding: 5rem 1rem 2rem;
}

@media (min-width: 768px) {
    .skel-royalties-main {
        padding: 2rem;
        margin-left: 0;
    }
}

.skel-stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .skel-stats-row { grid-template-columns: repeat(4, 1fr); }
}

.skel-stat-card {
    height: 100px;
    border-radius: 12px;
}

.skel-action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .skel-action-grid { grid-template-columns: repeat(4, 1fr); }
}

.skel-action-card {
    height: 88px;
    border-radius: 12px;
}

.skel-banner {
    height: 120px;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.skel-activity {
    padding: 1.5rem;
    background: rgba(42, 42, 42, 0.5);
    border-radius: 12px;
}

.skel-activity__title {
    width: 140px;
    height: 18px;
    margin-bottom: 1.5rem;
}

.skel-activity-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.skel-activity-row__left {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.skel-activity-row__icon {
    width: 40px;
    height: 40px;
}

.skel-activity-row__text {
    width: 120px;
    height: 14px;
}

.skel-activity-row__sub {
    width: 80px;
    height: 10px;
    margin-top: 0.35rem;
}

.skel-activity-row__pts {
    width: 64px;
    height: 14px;
}

/* ─── Simple page (form message) ─── */
.skel-simple {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
}

.skel-simple-card {
    width: 100%;
    max-width: 500px;
    padding: 2rem 1.5rem;
    background: #1E1E1E;
    border-radius: 12px;
    text-align: center;
}

.skel-simple-card__title {
    width: 80%;
    height: 32px;
    margin: 0 auto 1.5rem;
}

.skel-simple-card__btn {
    width: 120px;
    height: 44px;
    margin: 0 auto;
    border-radius: 6px;
}

/* Hide non-matching skeleton variants */
.mophyz-skeleton[data-layout="home"] .skel-layout:not(.skel-layout--home),
.mophyz-skeleton[data-layout="marketing"] .skel-layout:not(.skel-layout--marketing),
.mophyz-skeleton[data-layout="menu"] .skel-layout:not(.skel-layout--menu),
.mophyz-skeleton[data-layout="royalties"] .skel-layout:not(.skel-layout--royalties),
.mophyz-skeleton[data-layout="simple"] .skel-layout:not(.skel-layout--simple) {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .skel-block { animation: none; }
    .mophyz-skeleton { transition: none; }
}
