/* The Late 3RDS Home Shell v0.2.0 */

html.tlt3rds-canvas-root {
    background: #050508 !important;
}

body.tlt3rds-canvas-page {
    margin: 0 !important;
    padding: 0 !important;
    min-width: 320px;
    min-height: 100vh;
    overflow-x: hidden;
    background: #050508 !important;
    color: #f7f3ea;
    color-scheme: dark;
}

body.tlt3rds-canvas-page > .wp-site-blocks,
body.tlt3rds-canvas-page > main,
body.tlt3rds-canvas-page .entry-content,
body.tlt3rds-canvas-page .wp-block-post-content,
body.tlt3rds-canvas-page .wp-block-shortcode {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.tlt3rds-canvas-page .wp-block-shortcode > * {
    max-width: none !important;
}

.tlt3rds-home-shell,
.tlt3rds-home-shell * {
    box-sizing: border-box;
}

.tlt3rds-home-shell {
    --tlt3rds-bg: #050508;
    --tlt3rds-panel: rgba(13, 12, 18, 0.94);
    --tlt3rds-border: rgba(255, 255, 255, 0.16);
    --tlt3rds-text: #f7f3ea;
    --tlt3rds-muted: #b8b1bf;
    --tlt3rds-orange: #f47b32;
    --tlt3rds-purple: #a95cff;
    --tlt3rds-blue: #70c7ff;
    --tlt3rds-gold: #d7b76c;
    --tlt3rds-green: #9ec87d;
    position: relative;
    display: block;
    width: 100%;
    max-width: none !important;
    min-height: 100vh;
    margin: 0 !important;
    padding: 0;
    background: var(--tlt3rds-bg);
    color: var(--tlt3rds-text);
    isolation: isolate;
}

/* Compatibility escape hatch when the shortcode is previewed in a normal theme template. */
body:not(.tlt3rds-canvas-page) .tlt3rds-home-shell {
    width: 100vw;
    margin-inline: calc(50% - 50vw) !important;
}

.tlt3rds-scene-section {
    width: 100%;
    max-width: none !important;
    margin: 0;
    background: #020205;
}

.tlt3rds-scene {
    position: relative;
    width: min(100%, 1920px);
    max-width: none !important;
    aspect-ratio: 1672 / 941;
    margin-inline: auto;
    overflow: hidden;
    background: #020205;
}

.tlt3rds-scene picture,
.tlt3rds-scene img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none !important;
    margin: 0;
}

.tlt3rds-scene img {
    object-fit: cover;
}

.tlt3rds-hotspot-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    margin: 0;
    padding: 0;
}

.tlt3rds-hotspot {
    position: absolute;
    display: block;
    border: 1px solid transparent;
    border-radius: 14px;
    text-decoration: none !important;
    background: rgba(169, 92, 255, 0);
    transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.tlt3rds-hotspot span {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    max-width: calc(100% - 1.3rem);
    padding: 0.45rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    background: rgba(6, 5, 10, 0.88);
    color: #fff;
    font-size: clamp(0.68rem, 0.9vw, 0.92rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.04em;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 140ms ease, transform 140ms ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tlt3rds-hotspot:hover,
.tlt3rds-hotspot:focus-visible {
    border-color: rgba(255, 255, 255, 0.78);
    background: rgba(169, 92, 255, 0.10);
    box-shadow: inset 0 0 28px rgba(169, 92, 255, 0.18), 0 0 22px rgba(169, 92, 255, 0.22);
    outline: none;
}

.tlt3rds-hotspot:hover span,
.tlt3rds-hotspot:focus-visible span {
    opacity: 1;
    transform: translateY(0);
}

/* Percentage geometry is tied to the approved 1672 × 941 desktop render. */
.tlt3rds-hotspot--gm-suite {
    left: 19.5%;
    top: 9.2%;
    width: 20.6%;
    height: 29.5%;
}

.tlt3rds-hotspot--live-mocks {
    left: 61.2%;
    top: 7.5%;
    width: 34.6%;
    height: 31.8%;
}

.tlt3rds-hotspot--prize-counter {
    left: 20.3%;
    top: 39.4%;
    width: 20.6%;
    height: 27.4%;
}

.tlt3rds-hotspot--player-hub {
    left: 15.7%;
    top: 40.5%;
    width: 7.8%;
    height: 26.8%;
}

.tlt3rds-hotspot--arcade {
    left: 59.5%;
    top: 38.7%;
    width: 26%;
    height: 34.8%;
}

.tlt3rds-hotspot--legacy-suite {
    left: 85%;
    top: 39.4%;
    width: 14.2%;
    height: 34.5%;
}

.tlt3rds-room-directory {
    width: min(100%, 1280px);
    max-width: none !important;
    margin-inline: auto;
    padding: clamp(1rem, 2.4vw, 2.25rem) clamp(1rem, 3vw, 2.5rem) clamp(2rem, 4vw, 4rem);
}

.tlt3rds-room-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin: 0;
}

.tlt3rds-room-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "name action"
        "description action";
    gap: 0.35rem 1rem;
    min-height: 8.4rem;
    padding: 1.15rem 1.2rem;
    border: 1px solid var(--tlt3rds-border);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(27, 24, 34, 0.98), var(--tlt3rds-panel));
    color: var(--tlt3rds-text) !important;
    text-decoration: none !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.tlt3rds-room-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    border-radius: 16px 0 0 16px;
    background: var(--room-accent, var(--tlt3rds-purple));
}

.tlt3rds-room-card strong {
    grid-area: name;
    align-self: end;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    line-height: 1.1;
    letter-spacing: 0.025em;
}

.tlt3rds-room-card span {
    grid-area: description;
    align-self: start;
    color: var(--tlt3rds-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.tlt3rds-room-card b {
    grid-area: action;
    align-self: center;
    color: #fff;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tlt3rds-room-card:hover,
.tlt3rds-room-card:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.42);
    background: linear-gradient(145deg, rgba(38, 33, 48, 1), rgba(16, 14, 22, 0.98));
    outline: none;
}

.tlt3rds-room-card:focus-visible {
    box-shadow: 0 0 0 3px rgba(112, 199, 255, 0.65);
}

.tlt3rds-room-card--arcade { --room-accent: var(--tlt3rds-purple); }
.tlt3rds-room-card--live-mocks { --room-accent: #e85774; }
.tlt3rds-room-card--gm-suite { --room-accent: var(--tlt3rds-blue); }
.tlt3rds-room-card--prize-counter { --room-accent: var(--tlt3rds-orange); }
.tlt3rds-room-card--player-hub { --room-accent: var(--tlt3rds-green); }
.tlt3rds-room-card--legacy-suite { --room-accent: var(--tlt3rds-gold); }

.tlt3rds-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 960px) {
    .tlt3rds-room-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .tlt3rds-scene {
        aspect-ratio: 941 / 1672;
    }

    .tlt3rds-hotspot-layer {
        display: none;
    }

    .tlt3rds-room-directory {
        padding-top: 0.9rem;
    }

    .tlt3rds-room-grid {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }

    .tlt3rds-room-card {
        min-height: 6.4rem;
        padding: 1rem 1.05rem;
        border-radius: 14px;
    }

    .tlt3rds-room-card strong {
        font-size: 1.05rem;
    }

    .tlt3rds-room-card span {
        font-size: 0.86rem;
    }
}

@media (hover: none) {
    .tlt3rds-hotspot-layer {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tlt3rds-hotspot,
    .tlt3rds-hotspot span,
    .tlt3rds-room-card {
        transition: none;
    }
}
