/* Calendar Page Styles - Material/Tailwind inspired */
:root {
    --tf-cal-bg: #f6f8fc;
    --tf-cal-card: #ffffff;
    --tf-cal-text: #0f172a;
    --tf-cal-muted: #64748b;
    --tf-cal-line: #e2e8f0;
    --tf-cal-blue: #2563eb;
    --tf-cal-blue-2: #1d4ed8;
    --tf-cal-chip: #eef2ff;
    --tf-cal-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --tf-cal-shadow-soft: 0 6px 18px rgba(15, 23, 42, 0.06);
    --tf-cal-radius: 16px;
    --tf-cal-radius-sm: 12px;
    --tf-cal-max: 1040px;
}

* { box-sizing: border-box; }

.tf-calendar-body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    background: var(--tf-cal-bg);
    color: var(--tf-cal-text);
    line-height: 1.5;
}

.tf-calendar-body a { color: inherit; text-decoration: none; }
.tf-calendar-body img { display: block; max-width: 100%; }

.tf-cal-wrap {
    max-width: var(--tf-cal-max);
    margin: 0 auto;
    padding: 18px 16px 44px;
}

/* Top bar */
.tf-cal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 2px 14px;
    flex-wrap: wrap;
}

.tf-cal-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tf-cal-site {
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: 1.1rem;
}

.tf-cal-crumb {
    font-size: 12px;
    color: var(--tf-cal-muted);
}

.tf-cal-topbar-right {
    font-size: 12px;
    color: var(--tf-cal-muted);
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.tf-cal-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22c55e;
    display: inline-block;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
    flex-shrink: 0;
}

.tf-cal-dot--blue {
    background: var(--tf-cal-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

/* Hero */
.tf-cal-hero {
    background: var(--tf-cal-card);
    border: 1px solid var(--tf-cal-line);
    border-radius: var(--tf-cal-radius);
    box-shadow: var(--tf-cal-shadow);
    padding: 18px;
}

.tf-cal-hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 18px;
    align-items: start;
}

.tf-cal-kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--tf-cal-blue);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.tf-cal-hero h1 {
    margin: 0 0 10px;
    font-size: 34px;
    line-height: 1.08;
    letter-spacing: -0.03em;
    font-weight: 800;
}

.tf-cal-accent {
    color: var(--tf-cal-blue);
}

.tf-cal-subhead {
    margin: 6px 0 6px;
    font-size: 14px;
    font-weight: 800;
    color: var(--tf-cal-text);
}

.tf-cal-bullets {
    margin: 0 0 12px 16px;
    padding: 0;
    color: var(--tf-cal-text);
    line-height: 1.5;
    font-size: 13px;
}

.tf-cal-bullets li {
    margin-bottom: 6px;
}

.tf-cal-lead {
    margin: 0 0 14px;
    color: var(--tf-cal-muted);
    font-size: 14px;
    line-height: 1.55;
    max-width: 62ch;
}

.tf-cal-grid .tf-cal-event-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tf-cal-onsale-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff4ec;
    border: 1px solid rgba(182, 83, 28, 0.25);
    color: #b6531c;
    font-weight: 700;
    font-size: 12px;
}

.tf-cal-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 6px;
}

.tf-cal-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--tf-cal-chip);
    border: 1px solid rgba(37, 99, 235, 0.16);
    color: rgba(37, 99, 235, 0.95);
    font-weight: 700;
    font-size: 12px;
    white-space: nowrap;
}

.tf-cal-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--tf-cal-line);
    color: var(--tf-cal-muted);
    font-size: 12px;
}

.tf-cal-meta-row strong {
    color: var(--tf-cal-text);
    font-weight: 800;
}

.tf-cal-meta-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 180px;
}

.tf-cal-meta-label {
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 11px;
    color: #94a3b8;
    font-weight: 800;
}

/* Poster card */
.tf-cal-poster {
    border: 1px solid var(--tf-cal-line);
    border-radius: var(--tf-cal-radius);
    overflow: hidden;
    background: linear-gradient(135deg, #0b1220 0%, #1e293b 100%);
    box-shadow: var(--tf-cal-shadow-soft);
    position: relative;
    min-height: 210px;
    display: flex;
    align-items: flex-end;
}

.tf-cal-poster-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 30% 20%, rgba(37, 99, 235, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(99, 102, 241, 0.2) 0%, transparent 50%);
}

.tf-cal-poster img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    opacity: 0.92;
}

.tf-cal-banner {
    position: relative;
    margin: 12px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: calc(100% - 24px);
    backdrop-filter: blur(8px);
}

.tf-cal-banner-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.tf-cal-banner-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tf-cal-muted);
    font-weight: 700;
}

.tf-cal-banner b {
    font-size: 13px;
    color: var(--tf-cal-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tf-cal-banner > span {
    font-size: 12px;
    color: var(--tf-cal-muted);
    white-space: nowrap;
    font-weight: 600;
}

/* Controls */
.tf-cal-controls {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 1fr 220px 160px;
    gap: 10px;
    align-items: center;
}

.tf-cal-input,
.tf-cal-select {
    width: 100%;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid var(--tf-cal-line);
    background: #fff;
    color: var(--tf-cal-text);
    outline: none;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tf-cal-input:focus,
.tf-cal-select:focus {
    border-color: var(--tf-cal-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.tf-cal-input::placeholder {
    color: #94a3b8;
}

.tf-cal-select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #94a3b8 50%),
        linear-gradient(135deg, #94a3b8 50%, transparent 50%);
    background-position: calc(100% - 18px) 52%, calc(100% - 12px) 52%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 34px;
    cursor: pointer;
}

/* Buttons */
.tf-cal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid var(--tf-cal-line);
    background: #fff;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
    white-space: nowrap;
    font-family: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    text-decoration: none;
}

.tf-cal-btn:hover {
    transform: translateY(-1px);
}

.tf-cal-btn-primary {
    background: var(--tf-cal-blue);
    border-color: rgba(37, 99, 235, 0.35);
    color: #fff;
}

.tf-cal-btn-primary:hover {
    background: var(--tf-cal-blue-2);
}

.tf-cal-btn-sm {
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 12px;
    box-shadow: none;
}

.tf-cal-btn-ghost {
    background: #fff;
    color: var(--tf-cal-text);
}

.tf-cal-btn-ghost:hover {
    background: #f8fafc;
}

/* Month grid */
.tf-cal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 14px;
}

.tf-cal-month {
    background: var(--tf-cal-card);
    border: 1px solid var(--tf-cal-line);
    border-radius: var(--tf-cal-radius);
    box-shadow: var(--tf-cal-shadow-soft);
    overflow: hidden;
}

.tf-cal-month-head {
    padding: 14px 16px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    border-bottom: 1px solid var(--tf-cal-line);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.06), rgba(255, 255, 255, 0));
}

.tf-cal-month-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tf-cal-month-label {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 900;
}

.tf-cal-month-name {
    font-size: 16px;
    font-weight: 900;
    letter-spacing: -0.01em;
}

.tf-cal-count {
    font-size: 12px;
    font-weight: 900;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid var(--tf-cal-line);
    background: #fff;
    color: var(--tf-cal-muted);
}

/* Events list */
.tf-cal-events {
    padding: 14px;
    display: grid;
    gap: 10px;
}

.tf-cal-event {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--tf-cal-line);
    background: #fff;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.tf-cal-event:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.tf-cal-thumb {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--tf-cal-line);
    background: #f1f5f9;
    height: 72px;
}

.tf-cal-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tf-cal-event-content h3 {
    margin: 0 0 6px;
    font-size: 14px;
    letter-spacing: -0.01em;
    font-weight: 700;
}

.tf-cal-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--tf-cal-muted);
    font-size: 12px;
    margin-bottom: 8px;
}

.tf-cal-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--tf-cal-line);
    background: #fff;
    font-weight: 700;
    font-size: 11px;
}

.tf-cal-tag-type {
    background: var(--tf-cal-chip);
    border-color: rgba(37, 99, 235, 0.16);
    color: rgba(37, 99, 235, 0.95);
}

.tf-cal-event-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Empty state */
.tf-cal-empty {
    background: var(--tf-cal-card);
    border: 1px solid var(--tf-cal-line);
    border-radius: var(--tf-cal-radius);
    box-shadow: var(--tf-cal-shadow-soft);
    padding: 48px 24px;
    text-align: center;
    margin-top: 14px;
}

.tf-cal-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.tf-cal-empty h2 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 800;
}

.tf-cal-empty p {
    margin: 0 0 20px;
    color: var(--tf-cal-muted);
    font-size: 14px;
}

/* Footer */
.tf-cal-footer {
    margin-top: 16px;
    color: #94a3b8;
    font-size: 12px;
    text-align: center;
}

/* Responsive */
@media (max-width: 920px) {
    .tf-cal-hero-grid {
        grid-template-columns: 1fr;
    }

    .tf-cal-poster {
        min-height: 160px;
    }

    .tf-cal-controls {
        grid-template-columns: 1fr;
    }

    .tf-cal-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .tf-cal-wrap {
        padding: 12px 12px 32px;
    }

    .tf-cal-hero {
        padding: 14px;
    }

    .tf-cal-hero h1 {
        font-size: 26px;
    }

    .tf-cal-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .tf-cal-topbar-right {
        display: none;
    }

    .tf-cal-event {
        grid-template-columns: 1fr;
    }

    .tf-cal-thumb {
        height: 140px;
    }

    .tf-cal-chips {
        gap: 6px;
    }

    .tf-cal-chip {
        padding: 5px 8px;
        font-size: 11px;
    }
}
