/*
 * roguewizards.com site styles.
 * Loaded after theme.css (the original Triton theme stylesheet, kept verbatim).
 */

/* ---------- Heading font (from the theme's Cabin.css) ---------- */
@font-face {
    font-family: 'CabinRegular';
    src: url('../fonts/cabin-regular-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}
h1, h2, h3, h4, h5, h6, #topmenu ul li a { font-family: 'CabinRegular' !important; }

/* ---------- Colours chosen in the old theme options panel ---------- */
#masthead .fake { background: #1c0000; }
#footer { background: #00000000; color: #979797; }
.pattern { background: url(../images/theme/no_pattern.png) repeat; }

#posts, body, .post_wrap { color: #FFFF00; }
#posts .postitle, #posts .postitle a, .post_wrap a { color: #FFFF00; }
.post_wrap a:hover { color: #ffc400; }
#masthead { color: #ffc2c2; }
#footer a, #copyright a { color: #EDEEF0; }

/* ---------- Page background (scroll artwork) ---------- */
body.custom-background {
    background-color: #2c1f10;
    background-image: url("../images/background-filled.jpg");
    background-position: center top;
    background-size: auto;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

/* ---------- Bits of WordPress core CSS the layout relies on ---------- */
.aligncenter { clear: both; }
figure { margin: 0 0 1em; }
iframe { vertical-align: bottom; }

/* ---------- Text links in the bottom row (Development, Press Kit) ---------- */
.post_wrap a.rw-text-link {
    display: flex;
    align-items: center;
    height: 120px;
    font: bold 30px/1.1 'CabinRegular', Arial, Helvetica, sans-serif;
    text-align: center;
    white-space: nowrap;
    text-shadow: 2px 2px 0 #3a2a00, 0 0 8px #000;
}

/* ---------- Column layout (was the "column shortcodes" plugin) ---------- */
.one_half, .one_third, .one_fifth { float: left; }
.one_half  { width: 50%; }
.one_third { width: 33.3%; }
.one_fifth { width: 20%; }
.clear_column {
    clear: both;
    display: block;
    font-size: 0;
    height: 0;
    line-height: 0;
    width: 100%;
    overflow: hidden;
}
@media screen and (max-width: 600px) {
    .one_half, .one_third, .one_fifth {
        clear: both;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 1em;
    }
}

/* ---------- Screenshot carousel (see js/carousel.js) ---------- */
.rw-carousel {
    /* 200px tall, shrinking on phones so one whole screenshot fits the screen width. */
    --rw-carousel-height: min(200px, calc((100vw - 24px) * 0.5625));
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
    /* Fade the strip out at both ends. */
    -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.rw-carousel .rw-carousel-track {
    position: relative;
    display: flex;
    width: max-content;
    margin: 0;
    padding: 0;
    list-style: none;
    will-change: transform;
}
.rw-carousel .rw-carousel-track li {
    flex: none;
    margin: 0;
    padding: 0;
}
.rw-carousel .rw-carousel-track a {
    display: block;
    cursor: pointer;
}
.rw-carousel .rw-carousel-track a:hover { opacity: 0.7; }
.rw-carousel .rw-carousel-track a:focus-visible {
    outline: 3px solid #FFFF00;
    outline-offset: -3px;
}
/* Needs to out-rank the theme's ".type-page a img" max-width rule. */
.rw-carousel .rw-carousel-track img {
    display: block;
    width: auto;
    height: var(--rw-carousel-height);
    max-width: none;
    aspect-ratio: 16 / 9;
    border: 0;
    -webkit-user-drag: none;
}

/* ---------- Screenshot lightbox ---------- */
.rw-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    touch-action: none;
}
.rw-lightbox[hidden] { display: none; }
.rw-lightbox-image {
    display: block;
    box-sizing: border-box;
    width: auto;
    height: auto;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    border: 8px solid #fff;
    background: #fff;
    -webkit-user-drag: none;
    user-select: none;
}
.rw-lightbox button {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    cursor: pointer;
}
.rw-lightbox button:hover { background: rgba(60, 60, 60, 0.85); }
.rw-lightbox button:focus-visible { outline: 3px solid #FFFF00; }
.rw-lightbox button svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.rw-lightbox-close { top: 12px; right: 12px; }
.rw-lightbox-prev  { left: 12px;  top: 50%; margin-top: -28px; }
.rw-lightbox-next  { right: 12px; top: 50%; margin-top: -28px; }
.rw-lightbox-counter {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    text-align: center;
    pointer-events: none;
    color: #fff;
    font: 14px Arial, Helvetica, sans-serif;
    text-shadow: 0 1px 3px #000;
}

/* ---------- Tablets and phones ----------
 * The theme is a fixed 960px layout; below that width everything becomes fluid.
 */
@media (max-width: 1000px) {
    html, body { overflow-x: hidden; }
    .pattern { float: none; width: 100%; }
    .center { width: auto; max-width: 960px; padding: 0 12px; }
    #menu_wrap .center { padding: 0; }
    #logo { width: auto; float: none; }
    .no_sidebar .single_page_post { width: 100% !important; }
    .single_page_post .post_wrap { padding-right: 0; }

    .post_content img { max-width: 100% !important; height: auto; }
    .post_content iframe { max-width: 100%; }
    .rw-trailer iframe { width: 560px; height: auto; aspect-ratio: 16 / 9; }
    .rw-store-links { line-height: 1.5; }
}

@media (max-width: 600px) {
    /* The two top columns stack; centre what was left-aligned beside the logo. */
    .one_half > div[align] { text-align: center; }
    .one_half.last_column br { display: none; }
    .one_half.last_column iframe { margin-top: 16px; }

    /* Console store icons stay three in a row. */
    .one_half .one_third { clear: none; width: 33.3%; margin-bottom: 0; }
    .one_half .one_third img { float: none; display: block; margin: 5px auto; }

    /* Tighter vertical rhythm than the desktop's stacked line breaks. */
    .post_content > br { display: none; }
    .rw-trailer { margin-top: 28px; }
    .rw-trailer figure { margin: 0; }
    .rw-store-links { margin: 28px 0 90px; }
    .rw-carousel { margin-bottom: 24px; }

    /* Scroll artwork: enlarge it so the parchment sits behind the whole top section. */
    body.custom-background { background-size: auto 1250px; }

    /* Community links: Forums and Press Kit on one row, icons and studio logo below. */
    .rw-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 16px; }
    .rw-links .one_fifth { clear: none; width: auto; margin: 0; }
    .rw-links .one_fifth img { float: none; display: block; margin: 0; max-width: 150px !important; }
    .post_wrap .rw-links a.rw-text-link { float: none; justify-content: center; height: 72px; margin: 0; font-size: 28px; text-align: center; }
    /* The two text links share the first row; the icons and studio logo wrap below. */
    .rw-links .one_fifth:nth-child(1), .rw-links .one_fifth:nth-child(5) { flex: 0 0 46%; text-align: center; }
    .rw-links .one_fifth:nth-child(1) { order: 1; }
    .rw-links .one_fifth:nth-child(5) { order: 2; }
    .rw-links .one_fifth:nth-child(2) { order: 3; }
    .rw-links .one_fifth:nth-child(3) { order: 4; }
    .rw-links .one_fifth:nth-child(4) { order: 5; }
    .rw-links .clear_column { display: none; }
}

/* The Steam widget is a fixed 400px design, so scale it down on narrow phones. */
@media (max-width: 424px) {
    .one_half.last_column iframe { width: 400px; max-width: none; zoom: 0.84; }
}
@media (max-width: 359px) {
    .one_half.last_column iframe { zoom: 0.74; }
    .rw-links .one_fifth img { max-width: 120px !important; }
}
