/* =====================================================================
   Rising Kindergartener Summer Videos 2026 – Styles
   ===================================================================== */

/* ── CSS Variables per week ──────────────────────────────────────────── */
.week-bg-1 { --wc: #3b82f6; --wl: #eff6ff; --wd: #1d4ed8; }
.week-bg-2 { --wc: #22c55e; --wl: #f0fdf4; --wd: #15803d; }
.week-bg-3 { --wc: #f97316; --wl: #fff7ed; --wd: #c2410c; }
.week-bg-4 { --wc: #8b5cf6; --wl: #f5f3ff; --wd: #6d28d9; }
.week-bg-5 { --wc: #ec4899; --wl: #fdf2f8; --wd: #be185d; }
.week-bg-6 { --wc: #14b8a6; --wl: #f0fdfa; --wd: #0f766e; }
.week-bg-7 { --wc: #ef4444; --wl: #fef2f2; --wd: #b91c1c; }
.week-bg-8 { --wc: #6366f1; --wl: #eef2ff; --wd: #4338ca; }
.week-bg-9 { --wc: #f59e0b; --wl: #fffbeb; --wd: #b45309; }

/* ── Base Layout ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f3f4f6;
}

.kinder-layout { min-height: 100vh; }
.kinder-app    { min-height: 100vh; }

/* ── Header ──────────────────────────────────────────────────────────── */
.kinder-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, var(--wc), var(--wd));
    color: white;
    padding: 1.75rem 1.25rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.header-center {
    flex: 1;
    text-align: center;
}

.header-emoji {
    font-size: 2.75rem;
    line-height: 1;
    margin-bottom: 0.4rem;
}

.kinder-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 0.2rem;
}

.kinder-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.2rem;
    opacity: 0.95;
}

.focus-text {
    font-size: 0.95rem;
    margin: 0.2rem 0;
    opacity: 0.9;
}

.date-range {
    font-size: 0.82rem;
    margin: 0.1rem 0 0.6rem;
    opacity: 0.75;
}

/* ── Progress Bar ────────────────────────────────────────────────────── */
.progress-bar-container {
    position: relative;
    background: rgba(255,255,255,0.25);
    border-radius: 999px;
    height: 28px;
    max-width: 300px;
    margin: 0.5rem auto 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: rgba(255,255,255,0.65);
    border-radius: 999px;
    transition: width 0.4s ease;
    min-width: 0;
}

.progress-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--wd);
    white-space: nowrap;
}

/* ── Nav Buttons ─────────────────────────────────────────────────────── */
.nav-btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.45);
    color: white;
    font-weight: 700;
    font-size: 0.88rem;
    border-radius: 30px;
    padding: 0.5rem 1.1rem;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.35);
    transform: scale(1.05);
}

.nav-btn:disabled {
    opacity: 0.28;
    cursor: not-allowed;
}

/* ── Week Selector Dots ──────────────────────────────────────────────── */
.week-dots {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 0.5rem;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.week-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    background: white;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
    padding: 0;
}

.week-dot.active {
    background: var(--wc);
    border-color: var(--wc);
    color: white;
    transform: scale(1.12);
}

.week-dot:hover:not(.active) {
    border-color: var(--wc);
    color: var(--wd);
    background: var(--wl);
}

/* ── Days Grid ───────────────────────────────────────────────────────── */
.days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    padding: 1.25rem;
    max-width: 1280px;
    margin: 0 auto;
}

/* ── Day Card ────────────────────────────────────────────────────────── */
.day-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 3px 16px rgba(0,0,0,0.10);
    border-top: 4px solid var(--wc);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.day-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 28px rgba(0,0,0,0.14);
}

.today-card {
    border-top-width: 5px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.14), 0 0 0 3px var(--wc);
}

.all-done {
    border-top-color: #22c55e;
}

/* ── Day Card Header ─────────────────────────────────────────────────── */
.day-card-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1rem;
    background: var(--wl);
    border-bottom: 1px solid #f3f4f6;
    flex-wrap: wrap;
}

.day-name {
    font-weight: 800;
    font-size: 1rem;
    color: var(--wd);
}

.day-date {
    font-size: 0.82rem;
    color: #9ca3af;
    margin-left: auto;
}

.badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
}

.today-badge {
    background: var(--wc);
    color: white;
}

.done-badge {
    background: #22c55e;
    color: white;
}

/* ── Resource Section ────────────────────────────────────────────────── */
.resource-section {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s ease;
}

.resource-section:last-child {
    border-bottom: none;
}

.resource-section.alt {
    background: #fafafa;
}

.resource-section.watched {
    opacity: 0.65;
}

.resource-section.watched .resource-title {
    text-decoration: line-through;
    color: #9ca3af;
}

.resource-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    margin-bottom: 0.2rem;
}

.resource-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.35;
    margin-bottom: 0.5rem;
}

.resource-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ── Open Buttons ────────────────────────────────────────────────────── */
.open-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.open-btn:hover {
    transform: scale(1.06);
    filter: brightness(1.1);
    text-decoration: none;
}

.btn-video    { background: #ef4444; color: white; }
.btn-playlist { background: #f97316; color: white; }
.btn-search   { background: #6b7280; color: white; }
.btn-channel  { background: #7c3aed; color: white; }
.btn-game     { background: #0284c7; color: white; }

/* ── IXL Practice ────────────────────────────────────────────────────── */
.practice-section {
    padding: 0.65rem 1rem 0.75rem;
    background: #fafff7;
    border-bottom: 1px solid #f1f5f9;
}

.practice-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    margin-bottom: 0.45rem;
}

.practice-links {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.practice-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: white;
    border-radius: 0.65rem;
    border: 2px solid #e5f3e5;
    transition: border-color 0.2s, background 0.2s;
}

.practice-item.practice-done {
    border-color: #22c55e;
    background: #f0fdf4;
}

.practice-link {
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    flex: 1;
    border-radius: 0.4rem;
    padding: 0.1rem 0.3rem;
    transition: opacity 0.15s;
}

.practice-link:hover { opacity: 0.8; }

.math-link {
    color: #008c41;
}

.ela-link {
    color: #1d4ed8;
}

.practice-check-label {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    cursor: pointer;
    font-size: 0.72rem;
    color: #6b7280;
    user-select: none;
    white-space: nowrap;
}

.practice-check-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #008c41;
}

/* ── ABCmouse Assessment ─────────────────────────────────────────────── */
.abc-section {
    padding: 0.55rem 1rem 0.65rem;
    background: #fff8f0;
    border-bottom: 1px solid #f1f5f9;
}

.abc-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    margin-bottom: 0.35rem;
}

.abc-content {
    display: flex;
    align-items: center;
}

.abc-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: #ea580c;
    text-decoration: none;
    padding: 0.3rem 0.65rem;
    background: white;
    border: 2px solid #fed7aa;
    border-radius: 0.65rem;
    transition: background 0.15s, border-color 0.15s;
    display: inline-block;
}

.abc-link:hover {
    background: #fff7ed;
    border-color: #ea580c;
}

/* ── Daily Apps ──────────────────────────────────────────────────────── */
.apps-section {
    padding: 0.65rem 1rem 0.9rem;
    background: #f8faff;
    border-bottom: 1px solid #f1f5f9;
}

.apps-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.app-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    background: white;
    border-radius: 0.9rem;
    padding: 0.55rem 0.3rem 0.45rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    border: 2px solid transparent;
    transition: transform 0.15s, border-color 0.2s, background 0.2s;
}

.app-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

.app-tile.app-done {
    border-color: #22c55e;
    background: #f0fdf4;
}

.app-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    gap: 0.2rem;
}

.app-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: contain;
}

.app-name {
    font-size: 0.62rem;
    font-weight: 600;
    color: #374151;
    text-align: center;
    line-height: 1.2;
}

.app-check-label {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    cursor: pointer;
    font-size: 0.7rem;
    color: #6b7280;
    user-select: none;
}

.app-check-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #22c55e;
}

/* ── Watch Label ─────────────────────────────────────────────────────── */
.watch-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    font-size: 0.78rem;
    color: #9ca3af;
    user-select: none;
}

.watch-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: var(--wc);
}

.watched .watch-label {
    color: #22c55e;
    font-weight: 600;
}

/* ── Footer ──────────────────────────────────────────────────────────── */
.kinder-footer {
    text-align: center;
    padding: 1.75rem;
    color: #9ca3af;
    font-size: 0.9rem;
}

/* ── Loading / Blazor error ──────────────────────────────────────────── */
.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #ec4899;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text::after {
    content: var(--blazor-load-percentage-text, "Loading...");
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .kinder-header {
        flex-direction: column;
        padding: 1.25rem 1rem;
    }
    .nav-btn { font-size: 0.82rem; padding: 0.4rem 0.9rem; }
    .kinder-header h1 { font-size: 1.2rem; }
    .kinder-header h2 { font-size: 1rem; }
    .days-grid { grid-template-columns: 1fr; padding: 0.75rem; }
    .progress-bar-container { max-width: 240px; }
}
