/*
Theme Name: Happy Archive
Description: The Happy! Archive's original design with visual page editing and a complete scrolling devlog.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: happy-archive
*/
.main > :first-child { margin-top: 0; }
.main .wp-block-group { margin-top: 0; }
.main .wp-block-group.content-section { margin-bottom: 33px; }
.main .wp-block-group.empty-collection { margin-bottom: 33px; }
.main .is-layout-flow > p { margin: 0 0 18px; }
.main .is-layout-flow > .wp-block-heading { margin: 0 0 12px; }
.main .is-layout-flow > h1.wp-block-heading { margin-bottom: 24px; }
.main .is-layout-flow > .section-title { margin: 0 0 18px; }
.main .wp-block-heading { padding-left: 0; padding-right: 0; }
.main .wp-block-heading.section-title { padding: 7.5px 13.5px 7.5px 42px; }
:is(.main, .editor-styles-wrapper) .wp-block-details.bts-section { margin: 0 0 33px; }
:is(.main, .editor-styles-wrapper) .bts-section > summary {
    position: relative;
    display: block;
    padding: 7.5px 42px;
    border-top: 1.5px solid #869cda;
    border-bottom: 1.5px solid #000727;
    background: #273b84 url("assets/portal-ui/header-walnut.png") no-repeat 12px center / 22.5px 22.5px;
    color: #ffffff;
    font: bold 19.5px/1.4 Arial, Helvetica, sans-serif;
    cursor: pointer;
    list-style: none;
}
:is(.main, .editor-styles-wrapper) .bts-section > summary::-webkit-details-marker { display: none; }
:is(.main, .editor-styles-wrapper) .bts-section > summary::after { content: "+"; position: absolute; right: 15px; }
:is(.main, .editor-styles-wrapper) .bts-section[open] > summary { margin-bottom: 18px; }
:is(.main, .editor-styles-wrapper) .bts-section[open] > summary::after { content: "\2212"; }
:is(.main, .editor-styles-wrapper) .bts-section > summary:hover { background-color: #344b9a; }
:is(.main, .editor-styles-wrapper) .bts-section > summary:focus-visible { outline: 2px solid #fff27b; outline-offset: 3px; }
.main .wp-block-columns.welcome-table { display: flex; flex-wrap: nowrap !important; gap: 21px; margin: 0; }
.main .wp-block-column.welcome-copy { flex: 1 1 0; padding: 0; min-width: 0; align-self: flex-start; }
.main .welcome-copy > p:last-child { margin-bottom: 0; }
.main .wp-block-column.happy-cell { flex: 0 0 100px; flex-basis: 100px !important; margin: 0; align-self: flex-start; }
.main .wp-block-image { margin: 24px 0; }
.main .happy-cell .wp-block-image { margin: 0; }
.main .wp-block-image img { height: auto; }
.main iframe[src^="https://store.steampowered.com/widget/"] { display: block; max-width: 100%; margin: 18px auto; }
:is(.main, .editor-styles-wrapper) .wp-block-gallery.has-nested-images > figure.wp-block-image { flex-grow: 0; }
.main .wp-block-image.happy-render { width: 100px; margin: 0 auto; }
.main .wp-block-table { margin: 0 0 30px; }
.main .wp-block-table table { border-collapse: collapse; width: 100%; }
.main .wp-block-table.archive-list td { border: 0; border-bottom: 1.5px dotted #53639e; padding: 15px 12px; vertical-align: top; }
.main .wp-block-table.archive-list td:first-child { width: 30%; font-weight: bold; }
:is(.main, .editor-styles-wrapper) .wp-block-group:has(> :is(.wp-block-audio, .wp-block-file, .wp-block-video)) {
    margin: 0 0 18px;
    border: 1px solid #6171b5;
    background: #101b4d;
}
:is(.main, .editor-styles-wrapper) .wp-block-group:has(> :is(.wp-block-audio, .wp-block-file, .wp-block-video)) > :is(p, .wp-block-heading):first-child {
    margin: 0;
    padding: 10px 14px;
    border-bottom: 1px solid #53639e;
    background: #1b2b66;
    color: #fff27b;
    font-size: 18px;
    font-weight: bold;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
:is(.main, .editor-styles-wrapper) .wp-block-group:has(> :is(.wp-block-audio, .wp-block-file, .wp-block-video)) > :is(.wp-block-audio, .wp-block-file, .wp-block-video) {
    margin: 0;
    padding: 12px;
}
:is(.main, .editor-styles-wrapper) .wp-block-group:has(> .wp-block-audio) audio {
    display: block;
    width: 100%;
    color-scheme: dark;
}
:is(.main, .editor-styles-wrapper) .wp-block-group:is(.document-panel, .video-panel) > p:not(:first-child) {
    margin: 0;
    padding: 12px 14px 0;
}
:is(.main, .editor-styles-wrapper) .wp-block-group:is(.document-panel, .video-panel) > :is(.wp-block-file, .wp-block-video) {
    padding: 12px 14px 14px;
}
:is(.main, .editor-styles-wrapper) .video-panel video { display: block; width: 100%; height: auto; }
.main .wp-block-separator { width: 100%; max-width: 765px; height: 28.5px; margin: 21px auto; border: 0; background: url("assets/classic/divider.gif") center / 100% 100% no-repeat; opacity: 1; }
.post-body .wp-block-image img { display: inline-block; margin: 0; }
.wp-lightbox-overlay .lightbox-image-container {
    width: calc(100vw - 160px);
    height: calc(100dvh - 96px);
}
.wp-lightbox-overlay .lightbox-image-container img {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    object-fit: contain !important;
    object-position: center;
}
@media screen and (max-width: 600px) {
    .wp-lightbox-overlay .lightbox-image-container {
        width: calc(100vw - 24px);
        height: calc(100dvh - 144px);
    }
}
.post-body figure { max-width: 100%; }
.post-body .wp-block-embed__wrapper iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.post-body figcaption { color: #bcd9ff; font-size: 18px; }
.post-body .wp-block-gallery { display: flex; flex-wrap: wrap; gap: 18px; }
.post-body .wp-block-code { color: #e6eaff; }
.post-body .wp-block-pullquote { padding: 24px 0; }
.post-body .wp-block-button__link { background: #493369; color: #fff; border: 1.5px solid #b69bd9; border-radius: 0; }
.navigation .nav-text { margin: 18px; padding: 18px 6px; color: #fff27b; background: #493369; border: 1.5px solid #b69bd9; font-weight: bold; }
.main .has-small-font-size { font-size: 18px !important; }
.main .has-medium-font-size { font-size: 27px !important; }
.main .has-large-font-size { font-size: 33px !important; }
.main .has-x-large-font-size { font-size: 42px !important; }
@media screen and (max-width: 930px) {
    .main .wp-block-columns.welcome-table { display: block; }
    .main .wp-block-column.happy-cell { width: 100%; padding-top: 9px; }
    .main .wp-block-image.happy-render { width: 100px; }
    .main .wp-block-table.archive-list td { display: block; width: 100%; padding: 12px 6px; }
    .main .wp-block-table.archive-list td:first-child { width: 100%; padding-bottom: 0; border: 0; }
    .main .wp-block-table.archive-list td:last-child { padding-top: 6px; }
}
