/*
 * BOWA publication reader and card (version 0.5.0)
 *
 * The reader shows the publication one page image at a time, so it works on
 * phones without a PDF plugin. The card is the small link shown on the homepage.
 */

/* ----- Reader ----- */

.bowa-reader {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px;
}

.bowa-reader-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}

.bowa-reader-toolbar button {
    padding: 10px 16px;
    border: 2px solid #0f4c8a;
    border-radius: 999px;
    background: #ffffff;
    color: #0f4c8a;
    font-weight: 700;
    cursor: pointer;
}

.bowa-reader-toolbar button:disabled {
    opacity: 0.4;
    cursor: default;
}

.bowa-reader-toolbar button[aria-pressed="true"] {
    background: #0f4c8a;
    color: #ffffff;
}

.bowa-reader-toolbar button:focus-visible,
.bowa-reader-goto:focus-visible,
.bowa-reader-stage:focus-visible {
    outline: 3px solid #f5c542;
    outline-offset: 3px;
}

.bowa-reader-indicator {
    font-weight: 600;
    color: #0f4c8a;
}

.bowa-reader-goto {
    width: 4.5em;
    padding: 6px;
    text-align: center;
    font-size: 16px;
}

/* The stage holds the page image. Zoom makes it scrollable at full size. */
.bowa-reader-stage {
    display: flex;
    justify-content: center;
    background: #eef3f9;
    border-radius: 12px;
    padding: 12px;
    overflow: hidden;
}

.bowa-reader-img {
    display: block;
    max-width: 100%;
    height: auto;
    box-shadow: 0 8px 24px rgba(6, 37, 74, 0.25);
    border-radius: 4px;
    background: #ffffff;
}

.bowa-reader-stage.is-zoom {
    overflow: auto;
    justify-content: flex-start;
}

.bowa-reader-stage.is-zoom .bowa-reader-img {
    max-width: none;
    width: 160%;
}

.bowa-reader-hint {
    text-align: center;
    font-size: 14px;
    color: #4a5a6e;
    margin: 10px 0 0;
}

/* ----- Homepage card ----- */

.bowa-pub-card {
    display: flex;
    gap: 16px;
    align-items: center;
    max-width: 520px;
    padding: 16px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(6, 37, 74, 0.15);
    text-decoration: none;
    color: #0f4c8a;
}

.bowa-pub-card img {
    width: 120px;
    height: auto;
    border-radius: 6px;
    flex-shrink: 0;
}

.bowa-pub-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bowa-pub-text strong {
    font-size: 18px;
}

.bowa-pub-text > span:first-of-type {
    color: #4a5a6e;
    font-size: 15px;
}

.bowa-pub-btn {
    display: inline-block;
    align-self: flex-start;
    margin-top: 4px;
    padding: 8px 16px;
    border-radius: 999px;
    background: #0f4c8a;
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
}

.bowa-pub-card:focus-visible {
    outline: 3px solid #f5c542;
    outline-offset: 3px;
}

@media (max-width: 480px) {
    .bowa-pub-card {
        flex-direction: column;
        text-align: center;
    }
    .bowa-pub-btn {
        align-self: center;
    }
}
