/* Fria Hundar — customer frontend */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --color-bg: #fafaf8;
    --color-text: #2d2d2d;
    --color-primary: #3a6b35;
    --color-primary-light: #e8f0e6;
    --color-accent: #c97b1a;
    --color-muted: #777;
    --color-border: #e0ddd8;
    --font-body: system-ui, -apple-system, 'Segoe UI', sans-serif;
    --max-width: 960px;
}

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

/* Header */
.site-header {
    background: var(--color-primary);
    color: #fff;
    padding: 1.5rem 0;
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.site-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}
.site-header h1 a {
    color: #fff;
    text-decoration: none;
}
.site-header .tagline {
    font-size: 0.85rem;
    opacity: 0.8;
    font-weight: 400;
}

/* Nav */
nav a {
    color: rgba(255,255,255,.85);
    text-decoration: none;
    margin-left: 1.5rem;
    font-size: 0.95rem;
    transition: color .15s;
}
nav a:hover, nav a.active {
    color: #fff;
    text-decoration: underline;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Main content */
main {
    padding: 2rem 0 3rem;
}

/* Hero */
.hero {
    background: var(--color-primary-light);
    border-bottom: 1px solid var(--color-border);
    padding: 3rem 0;
    text-align: center;
}
.hero h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}
.hero p {
    color: var(--color-muted);
    font-size: 1.1rem;
}

/* Cards grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: box-shadow .15s;
}
.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}
.card h3 a {
    color: var(--color-text);
    text-decoration: none;
}
.card h3 a:hover {
    color: var(--color-primary);
}
.card .excerpt {
    color: var(--color-muted);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}
.card .price {
    font-weight: 600;
    color: var(--color-accent);
    font-size: 1.1rem;
}
.card .featured-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Page content */
.page-content {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 2rem;
}
.page-content h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}
.page-content img {
    max-width: 100%;
    height: auto;
}

/* Status banner (API debug) */
.api-status {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}
.api-status.success {
    background: #d1fae5;
    color: #065f46;
    border-color: #6ee7b7;
}
.api-status.error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fca5a5;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--color-muted);
    font-size: 0.85rem;
}

/* Section headings */
.section-title {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
}

/* Offering detail */
.offering-price {
    font-size: 1.3rem;
    color: var(--color-accent);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Schedules section */
.schedules-section {
    margin-top: 2rem;
}
.schedules-section .section-title {
    margin-bottom: 1rem;
}

/* City group */
.city-group {
    margin-bottom: 1.5rem;
}
.city-name {
    font-size: 1.15rem;
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-primary-light);
    padding-bottom: 0.35rem;
    margin-bottom: 0.75rem;
}

/* Schedule card */
.schedule-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 0.75rem;
}
.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.schedule-meta {
    color: var(--color-muted);
    font-size: 0.9rem;
}
.schedule-location {
    font-size: 0.9rem;
    color: var(--color-muted);
    margin-bottom: 0.75rem;
}

/* Session chips */
.sessions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}
.session-chip {
    display: inline-block;
    background: var(--color-primary-light);
    color: var(--color-text);
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
}

/* Schedule actions / status badges */
.schedule-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
    margin-top: 0.5rem;
}
.schedule-actions .inline-form {
    margin: 0;
}
.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}
.badge-full {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}
.badge-closed {
    background: #e5e7eb;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

/* Disabled-form dim — used to direct attention to the form/section
   that's currently active (e.g. contact form gets dimmed when payment
   form appears, payment form gets dimmed while "Behandlas" is shown). */
.booking-form.is-disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background .15s, opacity .15s;
}
.btn-primary {
    background: var(--color-primary);
    color: #fff;
}
.btn-primary:hover {
    background: #2f5a2b;
}
.btn-secondary {
    background: #fff;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}
.btn-secondary:hover {
    background: #f3f4f6;
}

/* Booking form */
.booking-form {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}
.booking-form fieldset {
    border: none;
    padding: 0;
    margin-bottom: 1.5rem;
}
.booking-form legend {
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
}
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.form-row .form-group {
    flex: 1;
    min-width: 180px;
}
.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}
.form-group input[type=text],
.form-group input[type=email],
.form-group input[type=tel],
.form-group input[type=date],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: -1px;
    border-color: var(--color-primary);
}
.form-group textarea {
    min-height: 80px;
    resize: vertical;
}
.field-error {
    color: #991b1b;
    font-size: 0.8rem;
    display: block;
    margin-top: 0.25rem;
}
.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
}
.checkbox-inline input[type=checkbox] {
    width: auto;
    margin: 0;
}
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

/* Countdown timer */
.booking-timer {
    background: var(--color-primary-light);
    border-left: 4px solid var(--color-primary);
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin: 1rem 0;
    font-size: 0.95rem;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
/* Last minute — make it obvious the time is running out */
.booking-timer.warning {
    background: #fef9c3;
    border-left-color: #ca8a04;
}
.booking-timer.warning .timer-value {
    color: #a16207;
}
.booking-timer .timer-value {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-primary);
    font-variant-numeric: tabular-nums;
    margin-left: 0.25rem;
}
.booking-timer.expired {
    background: #fef2f2;
    border-left-color: #dc2626;
}
.booking-timer.expired .timer-value {
    color: #dc2626;
}

/* Booking summary on confirmation page */
.booking-course {
    color: var(--color-muted);
    margin: 0.5rem 0 1rem;
}
.booking-summary dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.4rem 1rem;
    margin: 1rem 0;
}
.booking-summary dt {
    font-weight: 600;
    color: var(--color-muted);
}
.booking-summary dd {
    margin: 0;
}
.lead {
    font-size: 1.05rem;
    color: var(--color-muted);
    margin-bottom: 1rem;
}

/* ── Block editor content ─────────────────────────────────── */
.page-blocks p.ingress {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.content-image {
    margin: 1.5rem 0;
}
.content-image img {
    max-width: 100%;
    border-radius: 6px;
    display: block;
}
.content-image figcaption {
    font-size: 0.85rem;
    color: var(--color-muted);
    margin-top: 0.4rem;
}

.content-embed {
    margin: 1.5rem 0;
}
.embed-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 6px;
}
.embed-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.content-embed figcaption {
    font-size: 0.85rem;
    color: var(--color-muted);
    margin-top: 0.4rem;
}

/* Calendar — disabled events (full / closed / past) */
.ec-event-disabled {
    cursor: not-allowed !important;
    opacity: 0.55;
}

/* Calendar — event detail modal */
.ec-event-dialog {
    max-width: 480px;
    width: calc(100% - 2rem);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--color-border);
}
.ec-event-dialog::backdrop {
    background: rgba(0, 0, 0, 0.4);
}
.ec-event-info {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.4rem 1rem;
    margin: 0 0 1.25rem;
}
.ec-event-info dt {
    color: var(--color-muted);
    font-weight: 500;
}
.ec-event-info dd {
    margin: 0;
}
.ec-event-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
}

/* Promotion code + payment summary */
.promo-code-toggle {
    display: inline-block;
    font-size: 0.95rem;
    text-decoration: underline;
}
.promo-code-applied {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
}
.btn-link {
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
}
.btn-link:hover {
    opacity: 0.8;
}
.payment-summary {
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
}
.payment-summary-heading {
    margin-bottom: 0.6rem;
    font-size: 1.05rem;
}
.payment-summary-activity {
    padding: 0.5rem 0 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 0.5rem;
}
.payment-summary-activity-title {
    font-weight: 600;
}
.payment-summary-meta {
    color: #6b7280;
    font-size: 0.92rem;
}
.payment-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
}
.payment-summary-addon {
    color: #4b5563;
    font-size: 0.95rem;
}
.payment-summary-subtotal {
    border-top: 1px solid #f3f4f6;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
}
.payment-summary-vat {
    margin-top: 0.5rem;
    border-top: 1px solid #f3f4f6;
    padding-top: 0.5rem;
}
.payment-summary-vat-row {
    font-size: 0.92rem;
    padding: 0.1rem 0;
}
.payment-summary-discount {
    color: #166534;
}
.payment-summary-total {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
    font-size: 1.05rem;
}
.muted {
    color: #6b7280;
    font-weight: normal;
}
