/* Minimal, Mud-free base style for merchants on the "plain" layout.
   A starting point — each such merchant can override/replace this. */
:root {
    --pp-fg: #1a1a1a;
    --pp-bg: #ffffff;
    --pp-accent: #0b6b53;
    --pp-muted: #6b7280;
    --pp-maxw: 900px;
}

.pp-site {
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    color: var(--pp-fg);
    background: var(--pp-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

.pp-inner {
    max-width: var(--pp-maxw);
    margin: 0 auto;
    padding: 0 1.25rem;
    width: 100%;
    box-sizing: border-box;
}

.pp-header {
    border-bottom: 2px solid var(--pp-accent);
    padding: 1.25rem 0;
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: 0.01em;
}

.pp-main {
    flex: 1 0 auto;
    padding: 2rem 0;
}

.pp-footer {
    border-top: 1px solid #e5e7eb;
    padding: 1.25rem 0;
    color: var(--pp-muted);
    font-size: 0.9rem;
}

/* Blazor error banner: hidden by default; Blazor sets inline display:block when an
   unhandled error or circuit drop occurs. The Mud layouts carry this rule in their
   scoped .razor.css; the plain layout has no scoped css, so it lives here. */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    background: lightyellow;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* --- Gallery (gallery-list component) --- */
.pp-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0;
}
.pp-card {
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.pp-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
    border-color: var(--pp-accent);
}
.pp-card-img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
    background: #f3f4f6;
}
.pp-card-title {
    padding: 0.7rem 0.9rem;
    font-weight: 600;
}

/* Fallback for cards without an image: fills the same 3:2 slot. */
.pp-card-noimg {
    aspect-ratio: 3 / 2;
    width: 100%;
    display: flex;
    box-sizing: border-box;
    overflow: hidden;
}
/* a text excerpt of the article, clamped to a few lines */
.pp-card-noimg-text {
    align-items: flex-start;
    padding: 0.85rem 1rem;
    background: #f9fafb;
    color: var(--pp-muted);
    font-size: 0.9rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    line-clamp: 5;
}
/* no text either: a coloured poster with the title's initial */
.pp-card-noimg-poster {
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--pp-accent), #0a4a3a);
}
.pp-card-noimg-poster span {
    font-size: 2.6rem;
    font-weight: 700;
    color: #fff;
    opacity: 0.95;
}

/* --- Badges (PlainBadges) --- inline by default; overlaid on a gallery card */
.pp-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}
/* On a gallery card: overlay top-left on the image */
.pp-card .pp-badges {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 1;
    max-width: calc(100% - 1rem);
}
/* On the article detail page: sit under the title with some breathing room */
.pp-article > .pp-badges {
    margin: 0 0 1.25rem;
}

/* --- Item groups (PlainItemGroups) --- the groups an article belongs to, as tag links
   at the foot of the detail page (Mud-free equivalent of ShowItemGroups' chips) */
.pp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.75rem 0 0;
}
.pp-tag {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    text-decoration: none;
    color: var(--pp-muted);
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.pp-tag:hover {
    color: var(--pp-fg);
    border-color: var(--pp-accent);
    background: #fff;
}
.pp-badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: 0.02em;
    /* defaults; per-badge --bg/--fg override via inline style */
    background: var(--pp-accent);
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
    white-space: nowrap;
}

/* --- Group intro text (ShowGroupPlain: the group's own Text, above the listing) --- */
.pp-group-text { margin: 0 0 2rem; line-height: 1.6; }
.pp-group-text img { max-width: 100%; height: auto; border-radius: 12px; margin: 1rem 0; }

/* --- Article detail (ShowArticlePlain) --- */
.pp-article { margin: 1rem 0 2.5rem; }
.pp-article-title {
    font-size: 1.9rem;
    line-height: 1.2;
    margin: 0 0 1rem;
}
.pp-article .markdown img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1rem 0;
}
.pp-muted { color: var(--pp-muted); }
.pp-notfound {
    color: var(--pp-muted);
    padding: 2rem 0;
    text-align: center;
}

/* --- Top menu (PlainMenu) --- */
.pp-header .pp-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.pp-brand {
    font-weight: 700;
    font-size: 1.35rem;
    text-decoration: none;
    color: inherit;
}
.pp-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.1rem;
    margin-left: auto;
    font-size: 0.98rem;
}
.pp-nav-link {
    text-decoration: none;
    color: var(--pp-muted);
    padding: 0.2rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.pp-nav-link:hover {
    color: var(--pp-fg);
    border-bottom-color: var(--pp-accent);
}

/* --- Contact FAB (ContactFab) ---
   Pure-CSS pop-out: a hidden checkbox toggles the actions and the main-button icon.
   No JS/circuit needed, so it works on the static SSR plain path. */
.pp-fab {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}
.pp-fab-cb {
    /* hidden control that drives the open/closed state */
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.pp-fab-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.6rem;
    /* collapsed by default */
    opacity: 0;
    transform: translateY(0.75rem) scale(0.96);
    transform-origin: bottom right;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.pp-fab-cb:checked ~ .pp-fab-actions {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.pp-fab-action {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    color: inherit;
    background: transparent;
    border: 0;
    cursor: pointer;
}
.pp-fab-action-label {
    background: #ffffff;
    color: #111827;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
    white-space: nowrap;
}
.pp-fab-action-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.9rem;
    height: 2.9rem;
    border-radius: 50%;
    background: var(--fab-c, var(--pp-accent));
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
    font-size: 1.3rem;
    line-height: 1;
    flex: none;
    transition: transform 0.15s ease;
}
.pp-fab-action:hover .pp-fab-action-ic { transform: scale(1.08); }

.pp-fab-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.6rem;
    height: 3.6rem;
    border-radius: 50%;
    background: var(--pp-accent);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    user-select: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pp-fab-main:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.34); }
.pp-fab-cb:checked ~ .pp-fab-main { transform: rotate(90deg); }
.pp-fab-cb:focus-visible ~ .pp-fab-main { outline: 3px solid var(--pp-accent); outline-offset: 3px; }
/* swap the icon glyph on open */
.pp-fab-ic-close { display: none; }
.pp-fab-cb:checked ~ .pp-fab-main .pp-fab-ic-open { display: none; }
.pp-fab-cb:checked ~ .pp-fab-main .pp-fab-ic-close { display: inline; }

@media (max-width: 640px) {
    .pp-fab { right: 1rem; bottom: 1rem; }
    .pp-fab-action-ic { width: 2.7rem; height: 2.7rem; }
}

/* --- Search box (PlainSearchBox) + results (SearchPlain) ---
   A plain GET form (no circuit) that posts ?q= to /search. Sits in the header
   next to the menu, and is reused (prefilled) on the results page. */
.pp-search {
    display: flex;
    align-items: stretch;
    flex: 0 1 260px;
    min-width: 0;
}
.pp-search-input {
    font: inherit;
    font-weight: 400;
    color: var(--pp-fg);
    background: #fff;
    border: 1px solid #d1d5db;
    border-right: 0;
    border-radius: 8px 0 0 8px;
    padding: 0.4rem 0.7rem;
    min-width: 0;
    width: 100%;
}
.pp-search-input:focus {
    outline: none;
    border-color: var(--pp-accent);
}
.pp-search-btn {
    font: inherit;
    border: 1px solid var(--pp-accent);
    background: var(--pp-accent);
    color: #fff;
    border-radius: 0 8px 8px 0;
    padding: 0 0.85rem;
    cursor: pointer;
    line-height: 1;
    transition: filter 0.15s ease;
}
.pp-search-btn:hover { filter: brightness(1.08); }

/* results page (SearchPlain) — reuses .pp-gallery/.pp-card from the gallery */
.pp-search-page > .pp-search { max-width: 480px; flex-basis: auto; margin: 0 0 1.5rem; }
.pp-search-section { margin: 0 0 2rem; }
.pp-search-h {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
}
.pp-search-count { color: var(--pp-muted); font-size: 0.9rem; font-weight: 400; }

/* group hit = a .pp-tag with a hit-count badge */
.pp-tag-hit { display: inline-flex; align-items: center; gap: 0.45rem; }
.pp-tag-n {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4em;
    padding: 0 0.4em;
    border-radius: 999px;
    background: var(--pp-accent);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.5;
}
.pp-tag-hit:hover .pp-tag-n { filter: brightness(1.08); }

/* --- Plain form (raw-HTML forms embedded in article markdown, e.g. booking) ---
   Static SSR: no circuit, so a real <form> just posts. Experimental; unstyled
   form controls otherwise render inline and cramped, so give them a stacked look. */
.pp-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 480px;
    margin: 1.5rem 0;
}
.pp-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-weight: 600;
    font-size: 0.95rem;
}
.pp-field input,
.pp-field textarea {
    font: inherit;
    font-weight: 400;
    color: var(--pp-fg);
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.55rem 0.7rem;
    box-sizing: border-box;
    width: 100%;
}
.pp-field input:focus,
.pp-field textarea:focus {
    outline: none;
    border-color: var(--pp-accent);
    box-shadow: 0 0 0 3px rgba(11, 107, 83, 0.15);
}
.pp-field textarea { resize: vertical; }
.pp-btn {
    align-self: flex-start;
    font: inherit;
    font-weight: 600;
    color: #fff;
    background: var(--pp-accent);
    border: 0;
    border-radius: 8px;
    padding: 0.6rem 1.4rem;
    cursor: pointer;
    transition: filter 0.15s ease;
}
.pp-btn:hover { filter: brightness(1.08); }
