.book-search-results {
    margin-top: 1rem;
}

.book-search-prompt {
    margin-bottom: 0.75rem;
}

.book-search-options {
    display: grid;
    gap: 0.5rem;
}

.book-search-option,
.selected-book-card {
    box-sizing: border-box;
    width: 100%;
    padding: 0.7rem 0.8rem;

    border: 1px solid #b8b8b8;
    border-radius: 4px;
    background: transparent;

    color: inherit;
    font: inherit;
    line-height: 1.35;
    text-align: left;
}

.book-search-option {
    cursor: pointer;
}

.book-search-option:hover {
    border-color: #111;
    background: #fafafa;
}

.book-search-option:focus-visible {
    outline: 2px solid #111;
    outline-offset: 2px;
}

.book-search-option:disabled {
    cursor: default;
}

.book-search-option.is-submitting {
    border-color: #111;
    background: #fafafa;
}

.book-search-option-title {
    display: block;
    font-weight: 600;
}

.book-search-option-meta {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.9em;
}

.guess-submitted-message {
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.guess-submit-error {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-weight: 600;
}


/* Reveal areas ---------------------------------------------------------- */

.results-availability {
    margin: 0;
}

.reveal-button {
    box-sizing: border-box;
    padding: 0.55rem 0.9rem;
    border: 1px solid #111;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.reveal-button:hover:not(:disabled) {
    background: #fafafa;
}

.reveal-button:focus-visible {
    outline: 2px solid #111;
    outline-offset: 2px;
}

.reveal-button:disabled {
    cursor: default;
    opacity: 0.65;
}

.reveal-status {
    margin-top: 0.75rem;
}

.reveal-message {
    margin: 0;
}

.community-results-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding-left: 1.5rem;
}

.community-result-item {
    padding: 0.55rem 0;
    border-bottom: 1px solid #d8d8d8;
}

.community-result-item:last-child {
    border-bottom: 0;
}

.community-result-item::marker {
    font-weight: 600;
}

.community-result-item {
    display: list-item;
}

.community-result-book {
    display: inline-block;
    width: calc(100% - 4rem);
    vertical-align: top;
}

.community-result-title,
.solution-title {
    display: block;
    font-weight: 600;
}

.community-result-meta,
.solution-meta {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.9em;
}

.community-result-share {
    display: inline-block;
    width: 4rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    text-align: right;
    vertical-align: top;
}

.solution-card {
    box-sizing: border-box;
    width: 100%;
    padding: 0.7rem 0.8rem;
    border: 1px solid #b8b8b8;
    border-radius: 4px;
}

/*
 * WordPress block groups can have display:flex applied explicitly.
 * Ensure the HTML hidden attribute still hides reveal sections completely.
 */
.community-guesses[hidden],
.solution[hidden] {
    display: none !important;
}



/* Comic reader navigation ---------------------------------------------- */

.comic-navigation {
    display: grid;
    grid-template-columns: 2.25rem 2.25rem 2.25rem;
    column-gap: 0.8rem;
    align-items: center;
    justify-content: center;
    width: max-content;
    margin-left: auto;
    margin-right: auto;
}

.comic-navigation-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    min-height: 2.25rem;
}

.comic-navigation-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    min-height: 2.25rem;
    color: inherit;
    font: inherit;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.comic-navigation-random-mark {
    font-weight: 500;
}

.comic-navigation-link:hover {
    text-decoration: none;
    opacity: 0.65;
}

.comic-navigation-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.comic-container > .wp-block-shortcode {
    width: 100%;
    max-width: none;
}

.four-panel-book-club-current-comic {
    width: 100%;
    max-width: none;
    margin-top: 0;
    margin-bottom: 0;
}

.four-panel-book-club-current-comic img {
    display: block;
    width: 100%;
    height: auto;
}


/* Front-page reader shortcodes ------------------------------------------ */

/*
 * Match the understated typography of the native WordPress Post Date block
 * used on individual Comic pages.
 */
.four-panel-book-club-comic-date {
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--contrast-2);
}



/* Comic archive --------------------------------------------------------- */

.fpbc-archive-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--wp--preset--spacing--50, 2rem) var(--wp--preset--spacing--40, 1.5rem);
    width: 100%;
}

.fpbc-archive-card {
    min-width: 0;
}

.fpbc-archive-image-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.fpbc-archive-image {
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
}

.fpbc-archive-card-meta {
    margin-bottom: 0.65rem;
}

.fpbc-archive-title {
    margin: 0;
    font-size: var(--wp--preset--font-size--medium);
    line-height: 1.25;
}

.fpbc-archive-title a {
    color: inherit;
    text-decoration: none;
}

.fpbc-archive-title a:hover {
    text-decoration: underline;
}

.fpbc-archive-title a:focus-visible,
.fpbc-archive-image-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.fpbc-archive-date {
    margin-top: 0.25rem;
    color: var(--wp--preset--color--contrast-2);
    font-size: var(--wp--preset--font-size--small);
}

.fpbc-archive-pagination {
    margin-top: var(--wp--preset--spacing--50, 2rem);
}

.fpbc-archive-pagination .page-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fpbc-archive-pagination .page-numbers a,
.fpbc-archive-pagination .page-numbers .current,
.fpbc-archive-pagination .page-numbers .dots {
    display: inline-block;
    padding: 0.25rem 0.45rem;
}

.fpbc-archive-pagination .page-numbers .current {
    font-weight: 600;
}

@media (max-width: 600px) {
    .fpbc-archive-grid {
        grid-template-columns: 1fr;
    }
}

/* Solutions ------------------------------------------------------------- */

.fpbc-solutions-list {
    display: grid;
    gap: var(--wp--preset--spacing--60, 3rem);
    width: 100%;
}

/*
 * The containing Shortcode block receives WordPress's native alignwide class
 * in PHP. The theme therefore controls the 1100px wide-content width and
 * centers the Solutions index without custom breakout positioning.
 */

.fpbc-solutions-card {
    min-width: 0;
}

.fpbc-solutions-card-meta {
    margin-bottom: 0.75rem;
}

.fpbc-solutions-title {
    margin: 0;
    font-size: var(--wp--preset--font-size--medium);
    line-height: 1.25;
}

.fpbc-solutions-title a {
    color: inherit;
    text-decoration: none;
}

.fpbc-solutions-title a:hover {
    text-decoration: underline;
}

.fpbc-solutions-title a:focus-visible,
.fpbc-solutions-image-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.fpbc-solutions-date {
    margin-top: 0.25rem;
    color: var(--wp--preset--color--contrast-2);
    font-size: var(--wp--preset--font-size--small);
}

.fpbc-solutions-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: var(--wp--preset--spacing--50, 2rem);
    align-items: start;
}

.fpbc-solutions-comic,
.fpbc-solutions-results {
    min-width: 0;
}

.fpbc-solutions-image-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.fpbc-solutions-image {
    display: block;
    width: 100%;
    height: auto;
    max-width: none;
}

.fpbc-solutions-results {
    display: grid;
    gap: var(--wp--preset--spacing--50, 2rem);
}

.fpbc-solutions-section-title {
    margin: 0 0 0.75rem;
    font-size: var(--wp--preset--font-size--medium);
    line-height: 1.25;
}

.fpbc-solutions-reveal .reveal-status:empty {
    margin-top: 0;
}

.fpbc-solutions-pagination {
    margin-top: var(--wp--preset--spacing--50, 2rem);
}

.fpbc-solutions-pagination .page-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fpbc-solutions-pagination .page-numbers a,
.fpbc-solutions-pagination .page-numbers .current,
.fpbc-solutions-pagination .page-numbers .dots {
    display: inline-block;
    padding: 0.25rem 0.45rem;
}

.fpbc-solutions-pagination .page-numbers .current {
    font-weight: 600;
}

@media (max-width: 700px) {
    .fpbc-solutions-layout {
        grid-template-columns: 1fr;
    }
}


/* Guess search form ----------------------------------------------------- */

.book-search-form {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    width: 100%;
}

.book-search-input {
    box-sizing: border-box;
    flex: 1 1 auto;
    min-width: 0;
    height: 2.6rem;
    padding: 0 1rem;
    border: 1px solid #c8c8c8;
    border-radius: 10px;
    background: #fff;
    color: inherit;
    font: inherit;
    font-size: 0.9rem;
    line-height: 1;
}

.book-search-input::placeholder {
    color: #767676;
    opacity: 1;
}

.book-search-input:focus {
    border-color: #111;
    outline: none;
}

.book-search-input:focus-visible {
    outline: 2px solid #111;
    outline-offset: 2px;
}

.book-search-button {
    box-sizing: border-box;
    flex: 0 0 auto;
    height: 2.6rem;
    padding: 0 1.25rem;
    border: 0;
    border-radius: 10px;
    background: #111;
    color: #fff;
    font: inherit;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
}

.book-search-button:hover:not(:disabled) {
    background: #2b2b2b;
}

.book-search-button:focus-visible {
    outline: 2px solid #111;
    outline-offset: 2px;
}

.book-search-button:disabled {
    cursor: default;
    opacity: 0.65;
}
