/* Basisstijl van de embed-widget. Merk-/accentkleuren komen uit de manege-huisstijl
   (--htp-* variabelen, gezet door ThemeStyle); statuskleuren blijven bewust vast. */

/* ========================================================
   ROOT
   ======================================================== */
.htp-embed {
    font-family: var(--htp-font, system-ui, -apple-system, "Segoe UI", sans-serif);
    color: var(--htp-text, #2c2c2a);
    line-height: 1.5;
}

.htp-embed * { box-sizing: border-box; }
.htp-muted { color: #6b6b66; }
.htp-error-text { color: #a32d2d; }
.htp-success { color: #3b6d11; font-weight: 500; }

/* ========================================================
   LANDING — embed-kaart (dit is de embeddable widget zelf)
   ======================================================== */
.htp-embed-card {
    background: #fff;
    border: 1px solid #e8e8e0;
    border-radius: 14px;
    padding: 1.5rem 1.5rem 1.25rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.htp-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--htp-primary, #558b2f);
    margin: 0 0 1.1rem;
}

.htp-events-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
}

.htp-events-item {
    display: flex;
    gap: 0.7rem;
    align-items: baseline;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0ea;
}

.htp-events-item:last-child { border-bottom: none; }

.htp-events-date {
    font-size: 0.82rem;
    white-space: nowrap;
    color: #6b6b66;
    min-width: 60px;
}

.htp-events-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--htp-accent, #7cb342);
    font: inherit;
    font-weight: 500;
    font-size: 0.92rem;
    cursor: pointer;
    text-align: left;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.15s;
}

.htp-events-link:hover { text-decoration-color: currentColor; }

.htp-btn-agenda {
    display: block;
    width: 100%;
    background: var(--htp-accent, #7cb342);
    color: var(--htp-on-primary, #fff);
    border: none;
    border-radius: 8px;
    padding: 0.65rem 1rem;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: opacity 0.15s;
}

.htp-btn-agenda:hover { opacity: 0.88; }

/* ========================================================
   BREADCRUMB
   ======================================================== */
.htp-breadcrumb {
    font-size: 0.85rem;
    color: #6b6b66;
    margin-bottom: 1.25rem;
}

.htp-bc-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--htp-accent, #7cb342);
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
}

.htp-bc-sep { margin: 0 0.3rem; }

/* ========================================================
   AGENDA PAGINA
   ======================================================== */
.htp-agenda-page {
    padding: 1.5rem;
}

.htp-page-title {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--htp-text, #2c2c2a);
    margin: 0 0 0.5rem;
}

.htp-agenda-intro {
    color: #4a4a46;
    margin-bottom: 1.5rem;
}

/* Zoekbox */
.htp-search-box {
    background: var(--htp-surface, #f6f7f1);
    border-radius: 10px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 2rem;
}

.htp-search-heading {
    font-size: 1rem;
    font-weight: 600;
    color: var(--htp-accent, #7cb342);
    margin: 0 0 0.85rem;
}

.htp-search-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.75rem 1rem;
    align-items: end;
}

.htp-search-field { display: flex; flex-direction: column; gap: 4px; }
.htp-search-field label { font-size: 0.85rem; font-weight: 500; }

.htp-search-field input {
    border: 1px solid #d9d9d4;
    border-radius: 7px;
    padding: 0.45rem 0.65rem;
    font: inherit;
    font-size: 0.9rem;
    background: #fff;
}

.htp-search-checkbox {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    white-space: nowrap;
    padding-bottom: 2px;
    cursor: pointer;
}

/* Maand-groepen */
.htp-month-group { margin-bottom: 1.25rem; }

.htp-month-heading {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.htp-month-name { color: var(--htp-accent, #7cb342); }

.htp-month-year {
    color: var(--htp-text, #2c2c2a);
    opacity: 0.45;
    margin-left: 0.45rem;
    font-weight: 400;
}

/* Agenda-items */
.htp-agenda-item {
    padding: 0.85rem 0;
    border-bottom: 1px solid #e4e4dc;
}

.htp-agenda-item:last-child { border-bottom: none; }
.htp-agenda-item.is-full { opacity: 0.7; }

.htp-agenda-title-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--htp-text, #2c2c2a);
    cursor: pointer;
    text-align: left;
    transition: color 0.15s;
}

.htp-agenda-title-btn:hover { color: var(--htp-accent, #7cb342); }

.htp-agenda-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.2rem 0 0.35rem;
    flex-wrap: wrap;
}

.htp-agenda-date-str {
    font-size: 0.88rem;
    color: #4a4a46;
}

/* Status badges */
.htp-badge-open {
    background: var(--htp-primary, #558b2f);
    color: #fff;
    border-radius: 20px;
    padding: 0.18rem 0.65rem;
    font-size: 0.78rem;
    white-space: nowrap;
}

.htp-badge-dicht {
    border: 1px solid #bbb;
    color: #666;
    border-radius: 20px;
    padding: 0.18rem 0.65rem;
    font-size: 0.78rem;
    white-space: nowrap;
}

/* Capaciteitsbalk */
.htp-capacity-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.82rem;
    color: #6b6b66;
}

.htp-vol {
    color: #b22222;
    font-weight: 600;
    font-size: 0.85rem;
}

.htp-capacity-label { white-space: nowrap; }

.htp-progress {
    flex: 1;
    max-width: 180px;
    height: 6px;
    background: #e0e0d8;
    border-radius: 3px;
    overflow: hidden;
}

.htp-progress-fill {
    height: 100%;
    background: var(--htp-primary, #558b2f);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* ========================================================
   DETAIL PAGINA
   ======================================================== */
.htp-detail-page { padding: 1.5rem; }

.htp-detail-body {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: start;
}

.htp-detail-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 0.6rem;
}

.htp-detail-badges {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.htp-gcal-btn {
    font-size: 0.85rem;
    color: var(--htp-accent, #7cb342);
    text-decoration: none;
}

.htp-gcal-btn:hover { text-decoration: underline; }

.htp-detail-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.95rem;
    color: #4a4a46;
    margin-bottom: 1.25rem;
}

.htp-detail-desc {
    color: var(--htp-text, #2c2c2a);
    line-height: 1.65;
}

.htp-detail-desc p { margin: 0 0 0.75rem; }
.htp-detail-desc ul, .htp-detail-desc ol { padding-left: 1.4rem; margin: 0 0 0.75rem; }

/* Formulier-kaart */
.htp-form-card {
    background: var(--htp-surface, #f6f7f1);
    border: 1px solid #e0e0d8;
    border-radius: 12px;
    padding: 1.5rem;
    position: sticky;
    top: 1rem;
}

.htp-form-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--htp-text, #2c2c2a);
    margin: 0 0 1rem;
}

.htp-payment-info {
    font-size: 0.88rem;
    color: #4a4a46;
    background: #fffbe6;
    border-left: 3px solid #f5c842;
    padding: 0.6rem 0.8rem;
    border-radius: 0 6px 6px 0;
    margin-bottom: 1rem;
}

.htp-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.85rem;
    margin-top: 1rem;
}

.htp-consent a { color: var(--htp-accent, #7cb342); }

.htp-btn-submit {
    display: block;
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 0.7rem 1rem;
    background: var(--htp-primary, #558b2f);
    color: var(--htp-on-primary, #fff);
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: opacity 0.15s;
}

.htp-btn-submit:hover:not(:disabled) { opacity: 0.88; }
.htp-btn-submit:disabled { opacity: 0.55; cursor: default; }

/* ========================================================
   FORMULIERVELDEN (RegistrationFormRenderer)
   ======================================================== */
.htp-embed .htp-form { display: flex; flex-direction: column; gap: 0.85rem; }
.htp-embed .htp-form-field { display: flex; flex-direction: column; gap: 4px; }
.htp-embed .htp-form-field label { font-size: 0.88rem; font-weight: 500; }
.htp-embed .htp-form-field .req { color: #a32d2d; margin-left: 2px; }

.htp-embed .htp-form-field input,
.htp-embed .htp-form-field select,
.htp-embed .htp-form-field textarea {
    border: 1px solid #d9d9d4;
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
    font: inherit;
    color: inherit;
    background: #fff;
}

.htp-embed .htp-form-field.has-error input,
.htp-embed .htp-form-field.has-error select,
.htp-embed .htp-form-field.has-error textarea {
    border-color: #a32d2d;
}

.htp-embed .field-error { color: #a32d2d; font-size: 0.8rem; }

/* ========================================================
   RESPONSIEF — mobiel
   ======================================================== */
@media (max-width: 760px) {
    .htp-detail-body {
        grid-template-columns: 1fr;
    }

    .htp-form-card { position: static; }

    .htp-search-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================================
   BLAZOR ERROR
   ======================================================== */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fbe2e2;
    color: #a32d2d;
    padding: 0.6rem 1rem;
    font-family: system-ui, sans-serif;
}
