/* CrowdWork iCal Feed Service — Styles */
/* Version: 0.3.0 */

:root {
    --color-bg: #fafafa;
    --color-surface: #ffffff;
    --color-text: #1a1a1a;
    --color-text-muted: #666;
    --color-border: #e0e0e0;
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-success: #16a34a;
    --color-show: #7c3aed;
    --color-class: #0891b2;
    --radius: 6px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Header */
header { margin-bottom: 2rem; text-align: center; }
header h1 { font-size: 1.5rem; font-weight: 700; }
header h1 a { color: inherit; text-decoration: none; }
header .subtitle { color: var(--color-text-muted); font-size: 0.95rem; margin-top: 0.25rem; }

/* Venue Form */
.venue-form { margin-bottom: 2rem; }
.venue-form label { display: block; font-weight: 600; margin-bottom: 0.5rem; }
.input-group { display: flex; gap: 0.5rem; }
.input-group input {
    flex: 1;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 1rem;
}
.input-group button {
    padding: 0.6rem 1.2rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    cursor: pointer;
    white-space: nowrap;
}
.input-group button:hover { background: var(--color-primary-hover); }

.help-text { margin-top: 0.5rem; color: var(--color-text-muted); font-size: 0.85rem; }
.help-text a { color: var(--color-primary); text-decoration: none; }

/* Venue meta (id + change link inline with h2) */
.venue-meta {
    font-size: 0.85rem;
    font-weight: 400;
    white-space: nowrap;
}
.venue-display-id {
    color: var(--color-text-muted);
}
.venue-change-btn {
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
    margin-left: 0.25rem;
    text-decoration: none;
}
.venue-change-btn:hover {
    text-decoration: underline;
}
.venue-form-hidden {
    display: none;
}

/* Preview */
.preview h2 { margin-bottom: 0.25rem; }
.event-summary { color: var(--color-text-muted); margin-bottom: 1.25rem; }

/* Section headings */
.section-heading {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

/* Feed selector */
.feed-selector {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: #fafafa;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}
.feed-selector-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.feed-selector-controls label { font-weight: 600; }
.feed-buttons { display: flex; gap: 0.35rem; }
.feed-type-btn {
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    cursor: pointer;
    font-size: 0.9rem;
}
.feed-type-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Filter input */
.filter-label { font-weight: 600; margin-left: 0.25rem; }
.filter-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.filter-input {
    padding: 0.4rem 1.75rem 0.4rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    min-width: 160px;
}
.filter-clear {
    position: absolute;
    right: 0.35rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    font-size: 1.1rem;
    line-height: 1;
    padding: 0.15rem 0.25rem;
    border-radius: 3px;
}
.filter-clear:hover {
    color: var(--color-text);
    background: var(--color-border);
}

/* Subscribe section */
.subscribe-section {
    margin-top: 1.25rem;
    margin-bottom: 1.5rem;
}
.subscribe-buttons {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.btn {
    display: inline-block;
    border-radius: var(--radius);
    text-decoration: none;
    cursor: pointer;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: var(--shadow);
}
.btn:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* Subscribe buttons */
.btn-subscribe {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Cost note */
.cost-note { font-size: 0.8rem; color: var(--color-text-muted); margin-bottom: 0.75rem; }

/* Events table */
.events-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.events-table th, .events-table td {
    padding: 0.6rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}
.events-table th { background: #f5f5f5; font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; }
.events-table td { font-size: 0.9rem; }
.events-table a { color: var(--color-primary); text-decoration: none; }
.events-table a:hover { text-decoration: underline; }

.date-cell { font-size: 0.85rem; white-space: nowrap; }
.time-cell { font-size: 0.85rem; white-space: nowrap; }

.type-shows { color: var(--color-show); font-weight: 500; }
.type-classes { color: var(--color-class); font-weight: 500; }

.badge {
    display: inline-block;
    font-size: 0.7rem;
    background: var(--color-class);
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    margin-left: 0.4rem;
    vertical-align: middle;
}

.no-events {
    padding: 2rem;
    text-align: center;
    color: var(--color-text-muted);
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Footer */
footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); }
.disclaimer { font-size: 0.8rem; color: var(--color-text-muted); text-align: center; }
.disclaimer a { color: var(--color-primary); text-decoration: none; }

/* Responsive */
@media (max-width: 600px) {
    .container { padding: 1rem; }
    .input-group { flex-direction: column; }
    .subscribe-buttons { flex-direction: column; }
    .events-table { font-size: 0.85rem; }
    .events-table th, .events-table td { padding: 0.4rem 0.5rem; }
    .feed-selector-controls { flex-direction: column; align-items: flex-start; }
    .filter-input { width: 100%; }
}
