@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@200;300;400;500;600;700&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

:root {
    --ep-brand: #00b4e0;
    --ep-bg: #f8fafc;
    --ep-surface: #ffffff;
    --ep-border: #eef2f7;
    --ep-line: #f1f5f9;
    --ep-ink: #0f172a;
    --ep-muted: #64748b;
    --ep-faint: #94a3b8;
    --ep-radius: 16px;
    --ep-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--ep-bg);
    color: var(--ep-ink);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
}

/* ---------- Embed mode (no header/title, clean for iframe modal) ---------- */
.embed-mode {
    background-color: transparent;
}

.embed-mode .container {
    padding: 12px;
}

.embed-mode .filter-bar {
    margin-top: 0;
}

/* ---------- Header ---------- */
.header-section {
    background-color: var(--ep-surface);
    border-bottom: 1px solid var(--ep-border);
    padding: 14px 24px;
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ep-lang-switch {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background-color: var(--ep-bg, #f1f5f9);
    border: 1px solid var(--ep-border);
    border-radius: 9999px;
    padding: 3px;
}

.ep-lang-btn {
    border: 0;
    background: transparent;
    color: var(--ep-faint, #64748b);
    font-family: 'Roboto', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 5px 10px;
    border-radius: 9999px;
    cursor: pointer;
    line-height: 1;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.ep-lang-btn:hover {
    color: #1e293b;
}

.ep-lang-btn.active {
    background-color: var(--ep-brand);
    color: #fff;
    box-shadow: var(--ep-shadow);
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 9999px;
    background-color: var(--ep-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--ep-shadow);
    flex-shrink: 0;
}

.logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.brand-text h1 {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    color: #1e293b;
    margin: 0;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 0.5px;
    line-height: 1.05;
}

.brand-text p {
    margin: 2px 0 0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--ep-faint);
}

/* ---------- Filter bar (pills) ---------- */
.filter-bar {
    background-color: var(--ep-surface);
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    box-shadow: var(--ep-shadow);
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-title {
    display: none;
}

.filter-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    background-color: var(--ep-surface);
    color: var(--ep-muted);
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, opacity .15s ease;
}

.filter-checkbox:hover {
    background-color: #f8fafc;
}

.filter-checkbox input[type="checkbox"] {
    display: none;
}

.filter-checkbox .dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background-color: var(--c, #cbd5e1);
    flex-shrink: 0;
}

/* Activity pill — active (showing) */
.filter-checkbox[data-activity]:has(input:checked) {
    border-color: color-mix(in srgb, var(--c, #94a3b8) 45%, transparent);
    background-color: color-mix(in srgb, var(--c, #94a3b8) 12%, #ffffff);
    color: color-mix(in srgb, var(--c, #475569) 80%, #1e293b);
}

/* Activity pill — hidden (unchecked) */
.filter-checkbox[data-activity]:not(:has(input:checked)) {
    opacity: 0.5;
}

.filter-checkbox[data-activity]:not(:has(input:checked)) .dot {
    background-color: #cbd5e1;
}

/* "All / Tous" pill */
.filter-checkbox:not([data-activity]):has(input:checked) {
    background-color: #1e293b;
    border-color: #1e293b;
    color: #ffffff;
}

/* ---------- Calendar surface ---------- */
.innerwrapper {
    padding: 0;
    width: 100%;
    margin: 0 auto;
}

#wakesys_calendar {
    width: 100%;
    border: 1px solid var(--ep-border);
    border-radius: var(--ep-radius);
    box-shadow: var(--ep-shadow);
    padding: 16px 20px;
    font-family: 'Roboto', sans-serif;
    background-color: var(--ep-surface);
    position: relative;
}

/* FullCalendar toolbar */
.fc .fc-toolbar.fc-header-toolbar {
    margin-bottom: 16px;
    gap: 8px;
    flex-wrap: wrap;
}

.fc .fc-toolbar-title {
    font-family: 'Oswald', sans-serif;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #1e293b;
    text-transform: capitalize;
}

.fc .fc-button {
    background-color: var(--ep-line);
    border: none;
    color: var(--ep-muted);
    border-radius: 9999px;
    padding: 7px 14px;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-transform: none;
    box-shadow: none !important;
    transition: background-color .15s ease, color .15s ease;
}

.fc .fc-button:hover {
    background-color: #e2e8f0;
    color: var(--ep-ink);
}

/* Date-picker custom button: a clean line-style calendar icon (SVG injected
   into the button via JS) instead of an emoji glyph. */
.fc .fc-datePicker-button {
    line-height: 1;
    padding: 7px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.fc .fc-datePicker-button svg {
    display: block;
    pointer-events: none;
}

/* Real, transparent native date input layered over the date-picker button so a
   genuine user click opens the native picker even inside a cross-origin iframe
   (embed), where input.showPicker() is blocked. The webkit picker indicator is
   stretched to fill the button so a click anywhere on it opens the picker. */
.fc .fc-datePicker-button .ep-datepicker-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    cursor: pointer;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
}

.fc .fc-datePicker-button .ep-datepicker-overlay::-webkit-calendar-picker-indicator {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    cursor: pointer;
    opacity: 0;
}

.fc .fc-datePicker-button .ep-datepicker-overlay::-webkit-inner-spin-button,
.fc .fc-datePicker-button .ep-datepicker-overlay::-webkit-clear-button {
    display: none;
}

.fc .fc-button:focus,
.fc .fc-button:focus-visible {
    outline: none;
    box-shadow: none !important;
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
    background-color: var(--ep-brand);
    border-color: var(--ep-brand);
    color: #ffffff;
}

.fc .fc-button-primary:disabled {
    background-color: var(--ep-line);
    color: var(--ep-faint);
    opacity: 0.6;
}

/* Column (day) headers */
.fc-theme-standard td,
.fc-theme-standard th {
    border-color: var(--ep-border);
}

.fc-theme-standard .fc-scrollgrid {
    border-color: var(--ep-border);
    border-radius: 12px;
    overflow: hidden;
}

.fc .fc-col-header-cell {
    background-color: #f8fafc;
    padding: 6px 0;
}

.fc .fc-col-header-cell-cushion {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #334155;
    letter-spacing: 0.4px;
    padding: 8px 4px;
}

/* Time grid */
.fc .fc-timegrid-slot {
    height: 56px !important;
    border-color: var(--ep-line);
}

.fc .fc-timegrid-slot-minor {
    border-top-style: none;
}

.fc .fc-timegrid-slot-label-cushion,
.fc .fc-timegrid-axis-cushion {
    font-size: 11px !important;
    font-weight: 500 !important;
    color: var(--ep-faint);
}

/* Hide half-hour lines, keep hour lines */
.fc-timegrid-slot[data-time$=":30:00"] {
    border-top: none !important;
}

.fc-timegrid-slot[data-time$=":00:00"]:not([data-time$="00:00:00"]) {
    border-top: 1px solid var(--ep-line) !important;
}

/* Today column: no special highlight (FullCalendar's default yellow tint off) */
.fc .fc-day-today,
.fc .fc-timegrid-col.fc-day-today {
    background: transparent !important;
}

/* Now indicator: a thin line over the current time, drawn only on today's column */
.fc .fc-timegrid-now-indicator-line {
    border-color: var(--ep-brand);
    border-width: 1px 0 0;
}

.fc .fc-timegrid-now-indicator-arrow {
    border-color: var(--ep-brand);
    color: var(--ep-brand);
}

/* ---------- Event tiles ---------- */
.fc-v-event,
.fc-timegrid-event {
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    margin: 1px 2px;
    overflow: hidden;
}

.fc-v-event .fc-event-main {
    padding: 6px 8px;
    color: inherit;
}

.fc-timegrid-event .fc-event-main-frame {
    height: 100%;
}

.ep-event {
    display: flex;
    flex-direction: column;
    gap: 2px;
    height: 100%;
    text-align: left;
}

.ep-event-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ep-event-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 12px;
    line-height: 1.15;
    letter-spacing: 0.2px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ep-event-price {
    font-family: 'Roboto', sans-serif;
    font-size: 10px;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.7);
    color: #334155;
    padding: 1px 6px;
    border-radius: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.ep-event-time {
    font-family: 'Roboto', sans-serif;
    font-size: 10px;
    font-weight: 500;
    color: var(--ep-muted);
    line-height: 1.1;
}

.ep-event-status {
    margin-top: auto;
}

.ep-pill {
    display: inline-block;
    font-family: 'Roboto', sans-serif;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 2px 7px;
    border-radius: 9999px;
}

.ep-pill--ok {
    background-color: rgba(255, 255, 255, 0.7);
    color: #475569;
}

.ep-pill--low {
    background-color: #ffedd5;
    color: #c2410c;
}

.ep-pill--full {
    background-color: #fee2e2;
    color: #dc2626;
}

.ep-event-desc {
    font-family: 'Roboto', sans-serif;
    font-size: 10px;
    line-height: 1.25;
    color: #475569;
    margin-top: 1px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ep-event--muted {
    opacity: 0.75;
}

.ep-event--muted .ep-event-title {
    color: #64748b !important;
}

/* ---------- Event detail popover ---------- */
.ep-detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}

.ep-detail-modal {
    position: relative;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.3);
    max-width: 460px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 24px 26px 26px;
}

.ep-detail-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
}

.ep-detail-close:hover {
    color: #475569;
}

.ep-detail-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 20px;
    color: var(--ep-brand);
    margin: 0 28px 6px 0;
}

.ep-detail-meta {
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 2px;
}

.ep-detail-desc {
    margin-top: 14px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #334155;
}

.ep-detail-desc p {
    margin: 0 0 8px;
}

.ep-detail-desc p:last-child {
    margin-bottom: 0;
}

/* ---------- Loading overlay ---------- */
#loadingOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-radius: var(--ep-radius);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    .header-section {
        padding: 14px 16px;
    }

    .brand-text h1 {
        font-size: 20px;
    }

    #wakesys_calendar {
        padding: 12px;
    }

    .ep-event-title {
        font-size: 11px;
    }
}

/* ------------------------------------------------------------------ */
/* Opening-hours intro card (embed page opens on this before the grid) */
/* ------------------------------------------------------------------ */
.hidden { display: none !important; }

.oh-intro {
    padding: 16px;
    display: flex;
    justify-content: center;
}

.oh-card {
    width: 100%;
    max-width: 520px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: var(--ep-shadow, 0 1px 3px rgba(0,0,0,0.1));
    padding: 24px;
    font-family: 'Roboto', sans-serif;
}

.oh-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.oh-brand-circle {
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    background-color: var(--ep-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--ep-shadow, 0 1px 3px rgba(0,0,0,0.1));
}

.oh-brand-circle img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.oh-brand-title {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    color: #1e293b;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.5px;
    line-height: 1.05;
}

.oh-brand-sub {
    margin-top: 2px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
}

.oh-title {
    font-family: 'Oswald', sans-serif;
    font-size: 18px;
    color: #1e293b;
    margin: 0 0 12px;
}

.oh-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 12px;
}

.oh-title-row .oh-title {
    margin: 0;
}

.oh-title-block {
    flex: 1 1 auto;
    text-align: center;
    min-width: 0;
}

.oh-week-range {
    margin-top: 2px;
    font-size: 13px;
    font-weight: 600;
    color: #5b6b7a;
    font-variant-numeric: tabular-nums;
}

.oh-nav {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid #d6e3ec;
    background: #fff;
    color: #00b4e0;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}

.oh-nav:hover {
    background: #00b4e0;
    border-color: #00b4e0;
    color: #fff;
}

.oh-nav-placeholder {
    visibility: hidden;
    cursor: default;
}

.oh-unset {
    color: #9aa7b2;
}

.oh-week {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
}

.oh-day {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 15px;
    color: #334155;
}

.oh-day + .oh-day {
    border-top: 1px solid #f1f5f9;
}

.oh-day.oh-today {
    background: rgba(0, 180, 224, 0.08);
    font-weight: 600;
    color: #0f172a;
}

.oh-day-name { text-transform: capitalize; }
.oh-day-hours { font-variant-numeric: tabular-nums; }
.oh-closed { color: #94a3b8; }

.oh-closures h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #64748b;
    margin: 0 0 8px;
}

.oh-closures ul {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
}

.oh-closures li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 12px;
    font-size: 14px;
    color: #334155;
    border-radius: 8px;
}

.oh-closures li + li { border-top: 1px solid #f1f5f9; }
.oh-closure-date { font-weight: 600; }
.oh-closure-reason { color: #64748b; text-align: right; }

.oh-empty {
    margin: 0 0 18px;
    color: #94a3b8;
    font-size: 14px;
    padding: 4px 12px;
}

.oh-loading {
    color: #94a3b8;
    text-align: center;
    padding: 24px;
}

.oh-detail-btn {
    width: 100%;
    border: none;
    background-color: var(--ep-brand);
    color: #fff;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.oh-detail-btn:hover { filter: brightness(0.94); }

.oh-note {
    margin: 16px 0 4px;
    padding: 12px 14px;
    background-color: #f0f9ff;
    border: 1px solid #cdeafd;
    border-left: 3px solid var(--ep-brand);
    border-radius: 10px;
    color: #334155;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.oh-note p { margin: 0 0 8px; }
.oh-note p:last-child { margin-bottom: 0; }
.oh-note ul, .oh-note ol { margin: 6px 0; padding-left: 20px; }
.oh-note a { color: var(--ep-brand); }
