/* Art by Elias - App-specific styles to complement the house style */

/* Logo/header link */
.logo {
    text-decoration: none;
    color: inherit;
}

.logo:hover {
    text-decoration: underline;
}

/* Featured image on home page */
.featured-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    margin-bottom: var(--space);
}

/* Welcome text styling */
.welcome-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: calc(var(--space) * 2);
}

/* Artwork grid layout */
.artwork-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space);
    margin-bottom: calc(var(--space) * 2);
}

/* Individual artwork card */
.artwork-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.artwork-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Link inside artwork card */
.artwork-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Image inside artwork card */
.artwork-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--line);
    display: block;
}

/* Artwork info section */
.artwork-info {
    padding: var(--space);
}

/* Artwork title */
.artwork-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5em;
    color: var(--text);
}

/* Artwork details (size, medium) */
.artwork-details {
    font-size: 1rem;
    color: var(--muted);
    margin: 0 0 var(--space);
}

/* Availability badge */
.availability {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
}

.availability.available {
    background-color: var(--good-soft);
    color: var(--good);
}

.availability.sold {
    background-color: var(--bad-soft);
    color: var(--bad);
}

/* Sky to Canvas section */
.sky-to-canvas-section {
    margin: calc(var(--space) * 2) 0;
}

.sky-to-canvas-section h2 {
    margin-bottom: var(--space);
}

/* Pairing layout */
.pairing {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: calc(var(--space) * 2);
    margin-bottom: calc(var(--space) * 2);
    align-items: start;
}

.pairing-item {
    display: flex;
    flex-direction: column;
}

.pairing-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    background-color: var(--line);
    margin-bottom: var(--space);
    display: block;
}

.pairing-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--muted);
    margin: 0;
}

.pairing-story {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text);
}

.view-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    margin-top: 0.5em;
}

.view-link:hover {
    text-decoration: underline;
}

/* CTA section styling */
.cta-section {
    text-align: center;
}

.cta-buttons {
    display: flex;
    gap: var(--space);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--space);
}

/* Facebook button styling */
.facebook-button {
    background-color: var(--accent);
    color: var(--accent-text);
    padding: 9px 18px;
    border-radius: var(--radius);
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    border: 1px solid var(--accent);
    cursor: pointer;
    transition: filter 0.12s;
}

.facebook-button:hover {
    filter: brightness(0.93);
}

/* Artwork detail page layout */
.artwork-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(var(--space) * 2);
    margin-bottom: calc(var(--space) * 2);
    align-items: start;
}

.artwork-detail-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    background-color: var(--line);
    display: block;
}

.artwork-detail-info > h1 {
    margin-top: 0;
}

.artwork-specs {
    background: var(--accent-soft);
    padding: var(--space);
    border-radius: var(--radius);
    margin-bottom: var(--space);
}

.artwork-specs p {
    margin: 0 0 0.5em;
}

.artwork-specs p:last-child {
    margin-bottom: 0;
}

/* Inquiry form styling */
.inquiry-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space);
}

.back-button-container {
    text-align: center;
    margin-top: calc(var(--space) * 2);
}

/* Login section styling */
.login-section {
    max-width: 400px;
    margin: 0 auto;
}

.login-form {
    margin-top: var(--space);
}

/* Manage page header */
.manage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: calc(var(--space) * 2);
}

.manage-header h1 {
    margin: 0;
}

/* Add artwork section */
.add-artwork-section {
    margin-bottom: calc(var(--space) * 3);
}

.add-artwork-form {
    max-width: 600px;
}

/* Form row for side-by-side fields */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space);
}

/* Artwork item in manage list */
.artwork-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: var(--space);
}

.artwork-item-image {
    width: 120px;
    height: 120px;
    overflow: hidden;
    border-radius: var(--radius);
}

.artwork-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artwork-item-content h3 {
    margin-top: 0;
    margin-bottom: 0.5em;
}

.artwork-item-content p {
    margin: 0 0 0.5em;
    font-size: 1rem;
}

.artwork-item-content p:last-child {
    margin-bottom: 0;
}

/* About section styling */
.about-bio {
    max-width: 800px;
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Responsive design */
@media (max-width: 768px) {
    .pairing {
        grid-template-columns: 1fr;
        gap: var(--space);
    }

    .artwork-detail {
        grid-template-columns: 1fr;
    }

    .artwork-specs {
        grid-column: 1 / -1;
    }

    .inquiry-form-row {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .manage-header {
        flex-direction: column;
        gap: var(--space);
        align-items: flex-start;
    }

    .manage-header h1 {
        margin-bottom: 0;
    }

    .artwork-item {
        grid-template-columns: 100px 1fr;
    }

    .artwork-item-image {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .artwork-grid {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        gap: calc(var(--space) / 2);
    }
}

/* Upload page: the list of chosen photos and the saved / not saved result */
.chosen-list, .result-list { list-style: none; padding: 0; margin: 0.5rem 0; }
.chosen-list li { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid #767676; flex-wrap: wrap; }
.chosen-picture { width: 72px; height: 72px; object-fit: cover; border: 1px solid #767676; flex: none; }
.chosen-no-picture { display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; text-align: center; }
.chosen-name { flex: 1 1 10rem; overflow-wrap: anywhere; font-size: 1.125rem; }
#chosen-count { font-size: 1.25rem; }
.chosen-remove { min-height: 48px; padding: 0.5rem 1rem; font-size: 1.125rem; }
.upload-results { border: 3px solid #111; padding: 1rem; margin: 1rem 0; }
.upload-count { font-size: 1.25rem; }
.result-list li { font-size: 1.125rem; padding: 0.4rem 0 0.4rem 0.75rem; margin: 0.25rem 0; overflow-wrap: anywhere; }
.result-list.saved li { border-left: 6px solid #0b5d1e; }
.result-list.not-saved li { border-left: 6px solid #a30000; }

/* Confirm page: suggestions from the picture */
.ai-budget { font-size: 1.125rem; border-left: 6px solid #1a4fa0; padding: 0.4rem 0 0.4rem 0.75rem; }
.ai-note { font-size: 1.125rem; font-weight: 600; min-height: 1.5rem; }

/* Drafts, sample content, waiting count (owner only) */
.draft-note, .draft-mark { border: 3px dashed var(--warn, #7a4a00); padding: 8px 12px; border-radius: 6px; font-weight: 700; }
.draft-mark, .approved-mark { display: inline-block; margin-top: 6px; }
.approved-mark { border: 3px solid currentColor; padding: 8px 12px; border-radius: 6px; }
.waiting-count { font-weight: 800; text-decoration: underline; }
.sample-box { border: 3px solid currentColor; border-radius: 8px; padding: 12px 16px; margin: 16px 0; }
.site-text { border-top: 3px solid currentColor; padding-top: 12px; margin-top: 28px; }
.site-text textarea { width: 100%; box-sizing: border-box; font: inherit; }
.see-all { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; }

/* The owner's own bar, apart from the public menu (signed-in owner only) */
.owner-bar { width: 100%; max-width: 960px; margin: 0 auto 12px; padding: 10px var(--space, 16px); box-sizing: border-box;
             border: 3px solid currentColor; border-radius: 8px; }
.owner-bar-title { font-weight: 800; margin: 0 0 6px; }
.owner-bar ul { margin-bottom: 0; }
.owner-bar a { display: inline-block; padding: 10px 0; min-height: 44px; box-sizing: border-box; }
.sign-out-form { display: inline; margin: 0; }
.owner-bar button.sign-out { min-height: 44px; padding: 10px 0; font: inherit; color: inherit; background: none; border: 0;
    text-decoration: underline; cursor: pointer; }
.owner-bar button.sign-out:focus-visible { outline: 4px solid #ffbf47; outline-offset: 2px; }

/* Site Texts: an approved text looks different from a draft at a glance */
.site-text { scroll-margin-top: 12px; }
.site-text.is-approved { border-left: 8px solid currentColor; padding-left: 12px; }
.approved-mark { display: block; font-weight: 800; font-size: 1.15em; }
.approved-text { border: 2px solid currentColor; border-radius: 6px; padding: 4px 12px; margin: 12px 0; }
.change-text summary { font-weight: 700; padding: 12px 0; min-height: 44px; cursor: pointer; text-decoration: underline; }
.texts-summary { border: 3px solid currentColor; border-radius: 8px; padding: 10px 14px; }
.just-saved { font-weight: 800; }

/* Legal links, visits and inquiry delete (12 October 2026) */
.legal-links a { display: inline-block; padding: 10px 12px 10px 0; min-height: 44px; box-sizing: border-box; }
.legal-list li { margin-bottom: 12px; }
.visit-total { font-size: 1.2rem; margin: 6px 0; }
.inquiry-delete { margin-top: 12px; }
.inquiry-delete summary { cursor: pointer; padding: 10px 0; min-height: 44px; box-sizing: border-box; font-weight: 700; }

/* Home page slideshow (2026-11-01): full screen, slow and calm */
.slideshow {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: #ffffff;
}
.slideshow .slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    transition: opacity var(--fade-seconds, 3s) ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.slideshow .slide.is-showing { opacity: 1; z-index: 1; }
.slideshow .slide a { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; }
.slideshow .slide img { width: 100%; height: 100%; object-fit: contain; }
.slideshow .slide-title {
    position: absolute;
    bottom: 6.5rem;
    left: 50%;
    transform: translateX(-50%);
    max-width: 90%;
    padding: 0.4rem 1.2rem;
    background: rgba(255, 255, 255, 0.92);
    color: #1a1a1a;
    font-size: 1.6rem;
    text-align: center;
    border-radius: 6px;
}
.slideshow-controls {
    position: absolute;
    bottom: 1.5rem;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 1rem;
}
.slideshow-button {
    min-width: 64px;
    min-height: 64px;
    padding: 0 1.4rem;
    font-size: 1.5rem;
    color: #ffffff;
    background: #1a1a1a;
    border: 2px solid #ffffff;
    border-radius: 32px;
    cursor: pointer;
}
.slideshow-button:focus-visible { outline: 4px solid #ffbf47; outline-offset: 2px; }
/* Phone-size screens (2026-11-05): the picture starts at the top, the title and the buttons sit below it */
@media (max-width: 600px) {
    .slideshow { height: auto; display: grid; padding: 0; }
    .slideshow .slide { position: relative; inset: auto; grid-area: 1 / 1; justify-content: flex-start; }
    .slideshow .slide a { height: auto; padding: 0; }
    .slideshow .slide img { width: auto; max-width: 100%; height: auto; max-height: 70vh; object-fit: cover; }
    .slideshow .slide-title {
        position: static;
        transform: none;
        width: 100%;
        max-width: none;
        box-sizing: border-box;
        font-size: 1.3rem;
        overflow-wrap: anywhere;
    }
    .slideshow-controls { position: static; grid-row: 2; padding: 0.5rem 16px 1rem; }
    .slideshow-button { width: auto; flex: 0 0 auto; min-width: 56px; min-height: 56px; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
    .slideshow .slide { transition: none; }
}
.welcome-section { max-width: 52rem; margin: 2.5rem auto; padding: 0 16px; text-align: center; }
.welcome-line { font-size: 1.4rem; line-height: 1.7; }
.explore ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.month-slides { list-style: none; padding: 0; }
.month-slides li { display: flex; align-items: center; gap: 0.75rem; margin: 0.4rem 0; }
.month-slides img { width: 64px; height: 64px; object-fit: cover; }
.button.star.on { font-weight: bold; }
.book-page { max-width: 44rem; margin: 2rem auto; padding: 0 16px; }

/* ArtPal details on the manage page and "Buy this print" (2026-11-01) */
.artpal-form { border-top: 2px solid #c8bfae; margin-top: 1rem; padding-top: 1rem; }
.artpal-form h3 { margin: 0 0 0.5rem; }
.artpal-on { color: #1d5b2a; font-weight: bold; }
.artpal-off { color: #3d3a35; }
.button.buy-print { display: inline-block; min-height: 48px; min-width: 48px; font-size: 1.15rem; padding: 0.7rem 1.4rem; }

/* Copy buttons and "Download picture" on the ArtPal box (2026-11-02) */
.copy-field { display: flex; align-items: flex-start; gap: 0.6rem; }
.copy-field input, .copy-field textarea, .copy-field select { flex: 1; min-width: 0; }
.button.copy-button { min-height: 48px; min-width: 7.5rem; font-size: 1.15rem; font-weight: bold; flex: none; }
.button.download-picture { display: inline-block; min-height: 48px; font-size: 1.15rem; padding: 0.7rem 1.4rem; }

/* Easy to read everywhere (Redesign 5, 2026-11-02): many visitors are older. Text at least 20 px,
   at least 7:1 contrast for all text, links and buttons, calm neutral colors that let the art stand out,
   tap targets at least 44 px, and no sideways scrolling on a 360 px phone. One light palette, also in dark mode. */
:root {
    --bg: #f7f5f1; --surface: #ffffff; --text: #1f1d1a; --muted: #45413b; --line: #d6cfc4;
    --accent: #1e3f66; --accent-text: #ffffff; --accent-soft: #e9eef4;
    --good: #1a5226; --good-soft: #e8f2ea; --warn: #6b4300; --warn-soft: #f7efe1; --bad: #8a1c12; --bad-soft: #f8e9e7;
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #f7f5f1; --surface: #ffffff; --text: #1f1d1a; --muted: #45413b; --line: #d6cfc4;
        --accent: #1e3f66; --accent-text: #ffffff; --accent-soft: #e9eef4;
        --good: #1a5226; --good-soft: #e8f2ea; --warn: #6b4300; --warn-soft: #f7efe1; --bad: #8a1c12; --bad-soft: #f8e9e7;
    }
}
html { font-size: 20px; }
body { font-size: 20px; line-height: 1.6; overflow-wrap: break-word; }
header, main, footer { max-width: 960px; }
footer { font-size: 1rem; color: var(--text); }
small, .muted { font-size: 1rem; }
code, pre, kbd { font-size: 1em; }
thead th { font-size: 1rem; }
a { display: inline-block; min-height: 44px; min-width: 44px; padding: 8px 0; box-sizing: border-box; }
button, input[type=submit], input[type=button], input[type=reset], a.button { min-height: 48px; min-width: 44px; font-size: 1rem; }
button:disabled, input:disabled, select:disabled, textarea:disabled { opacity: 1; border-style: dashed; }
summary { min-height: 44px; padding: 10px 0; cursor: pointer; }
input[type=checkbox], input[type=radio] { width: 28px; height: 28px; }
nav ul { gap: 4px 22px; }
.footer-collections, .footer-links, .legal-links { display: flex; flex-wrap: wrap; gap: 0 22px; margin: 0 0 var(--space); }
.footer-links a { font-weight: 700; }
.copy-field { flex-wrap: wrap; }
@media (max-width: 480px) {
    .copy-field input, .copy-field textarea, .copy-field select { flex: 1 1 100%; }
}

/* Redesign 6: the owner's photo on About the Artist, and the book's Amazon button */
.artist-photo { display: block; width: 100%; max-width: 30rem; height: auto; margin: 0 auto 1.5rem; border-radius: 6px; }
.artist-photo-preview { display: block; width: 100%; max-width: 15rem; height: auto; border-radius: 6px; }
.book-description p { font-size: 1.1rem; }
.button.book-button { display: inline-block; font-size: 1.15rem; padding: 0.7rem 1.4rem; }

/* Redesign 7: visitors' notes under a picture, the suggestion form, the owner's outbox */
.leave-empty { display: none; }
.visitor-notes { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.visitor-note { border-left: 4px solid var(--line); padding: 0.5rem 1rem; margin-bottom: 1rem; }
.note-by { color: var(--muted); font-size: 1rem; margin: 0.25rem 0 0; }
.notes-section, .suggestion-section { margin: 2rem 0; }
.note-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.owner-note.waiting, .owner-suggestion.waiting { border-left: 4px solid var(--accent); }
.outbox-body { white-space: pre-wrap; font-family: inherit; }
