/* The photo collage apps on the photo collage runtime (js/seo/photo-collage-app.js): Letter Photo Collage, Photo Booth
   Strip, Film Strip, Scrapbook Page, Photo Calendar and Year in Review (Views/SeoLanding/_*Demo.cshtml). */

/* The stage: the picture keeps its own shape and fits the screen's height. */
.pc-app .pc-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(8px, 2vw, 22px);
    background: var(--ak-bg, #eef1f5);
}

.pc-app .pc-canvas {
    display: block;
    /* The size is set by js/seo/photo-collage-app.js (fitCss); these keep it inside the stage meanwhile. */
    max-width: 100%;
    aspect-ratio: var(--pc-aspect, 3 / 4);
    margin-inline: auto;
    touch-action: none;
    background-image: linear-gradient(45deg, rgba(128, 128, 128, 0.12) 25%, transparent 25%, transparent 75%, rgba(128, 128, 128, 0.12) 75%),
        linear-gradient(45deg, rgba(128, 128, 128, 0.12) 25%, transparent 25%, transparent 75%, rgba(128, 128, 128, 0.12) 75%);
    background-size: 18px 18px;
    background-position: 0 0, 9px 9px;
}

.pc-app .pc-canvas:focus-visible {
    outline: 3px solid var(--ak-accent, #2563eb);
    outline-offset: 2px;
}

.pc-app .pc-photo-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* Several pages (Photo Calendar): the page bar and the page thumbnails. */
.pc-app .pc-pagebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 4px 0;
}

.pc-app .pc-pagename {
    flex: 1;
    text-align: center;
    font-weight: 700;
}

.pc-app .pc-pagebar .ak-btn:disabled {
    opacity: 0.35;
}

.pc-app .pc-pages {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    margin: 4px 0 10px;
}

.pc-app .pc-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 0;
    padding: 3px 2px 2px;
    border: 2px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.72rem;
    line-height: 1.1;
    cursor: pointer;
}

.pc-app .pc-page canvas {
    display: block;
    width: 100%;
    height: auto;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.pc-app .pc-page span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pc-app .pc-page:hover {
    border-color: color-mix(in srgb, var(--ak-accent, #2563eb) 40%, transparent);
}

.pc-app .pc-page.is-active {
    border-color: var(--ak-accent, #2563eb);
    font-weight: 700;
}

.pc-app [data-ak-show][hidden] {
    display: none !important;
}

.pc-app textarea.ak-field {
    min-height: 4.5em;
    font-family: inherit;
    line-height: 1.4;
}

/* A wide picture (a word) sits in the middle of the stage, not at its top. */
.pc-app .pc-stage.filter-landing-stage {
    display: flex;
}

.pc-app .pc-stage .pc-canvas {
    margin: auto;
}
