/* Day of the Year Calculator — Scoped Styles, Light and Dark */

.doy-grid-bg {
    background-size: 40px 40px;
    background-image:
        linear-gradient(to right, rgba(245, 158, 11, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(245, 158, 11, 0.04) 1px, transparent 1px);
}
html.dark .doy-grid-bg {
    background-image:
        linear-gradient(to right, rgba(245, 158, 11, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(245, 158, 11, 0.03) 1px, transparent 1px);
}

/* Glassmorphic card surfaces — calculator workspace only */
#doy-workspace .apple-glass {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(228, 228, 231, 0.9);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
}
html.dark #doy-workspace .apple-glass {
    background: rgba(10, 10, 14, 0.92);
    border-color: rgba(255, 255, 255, 0.07);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Educational content section — clean, simple, transparent */
#educational-content {
    background: transparent !important;
}

/* Mobile inputs (16px avoids iOS zoom) */
#doy-workspace input[type="date"],
#doy-workspace input[type="number"],
#doy-workspace input[type="text"] {
    font-size: 16px !important;
    line-height: 1.5;
}

.doy-label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #3f3f46;
    cursor: pointer;
}
html.dark .doy-label { color: #d4d4d8; }

.doy-input {
    height: 44px;
    padding: 0 0.875rem;
    border-radius: 0.75rem;
    border: 1px solid #e4e4e7;
    background: #f4f4f5;
    color: #18181b;
    font-weight: 600;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.doy-input:focus {
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}
html.dark .doy-input {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f4f4f5;
    color-scheme: dark;
}

/* Stepper input */
.doy-stepper {
    height: 44px;
    border-radius: 0.75rem;
    border: 1px solid #e4e4e7;
    background: #f4f4f5;
    overflow: hidden;
}
.doy-stepper:focus-within {
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}
html.dark .doy-stepper {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
}
.doy-step {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 700;
    color: #52525b;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.doy-step:hover { background: #e4e4e7; color: #18181b; }
html.dark .doy-step { color: #a1a1aa; }
html.dark .doy-step:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

/* Tabs */
.doy-tab {
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 0.625rem;
    color: #71717a;
    transition: all 0.15s ease;
    cursor: pointer;
    user-select: none;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.doy-tab:hover { color: #18181b; }
html.dark .doy-tab { color: #a1a1aa; }
html.dark .doy-tab:hover { color: #ffffff; }
.doy-tab-active {
    background: #ffffff;
    color: #18181b !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
html.dark .doy-tab-active {
    background: #27272a;
    color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Quick chips */
.doy-chip {
    padding: 0.375rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    border: 1px solid #e4e4e7;
    background: #f4f4f5;
    color: #52525b;
    cursor: pointer;
    transition: all 0.15s ease;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}
.doy-chip:hover {
    background: #e4e4e7;
    color: #18181b;
    border-color: #d4d4d8;
}
html.dark .doy-chip {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    color: #a1a1aa;
}
html.dark .doy-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.16);
}

/* Reset / Action button */
.doy-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 0.75rem;
    border: 1px solid #e4e4e7;
    background: #f4f4f5;
    color: #52525b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}
.doy-icon-btn:hover { background: #e4e4e7; color: #18181b; }
html.dark .doy-icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    color: #a1a1aa;
}
html.dark .doy-icon-btn:hover { background: rgba(255, 255, 255, 0.1); color: #ffffff; }

/* Progress bar */
.doy-progress-track {
    height: 12px;
    border-radius: 9999px;
    background: #e4e4e7;
    overflow: hidden;
    position: relative;
}
html.dark .doy-progress-track {
    background: rgba(255, 255, 255, 0.08);
}
.doy-progress-fill {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(90deg, #f59e0b, #f97316, #10b981);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Stat card */
.doy-stat-box {
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(228, 228, 231, 0.8);
    background: rgba(244, 244, 245, 0.6);
}
html.dark .doy-stat-box {
    border-color: rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
}

/* Copy button */
.doy-copy-btn {
    padding: 0.5rem 0.875rem;
    border-radius: 0.625rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    border: 1px solid #e4e4e7;
    background: #ffffff;
    color: #3f3f46;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
    transition: all 0.15s ease;
}
.doy-copy-btn:hover {
    border-color: #d4d4d8;
    color: #18181b;
}
html.dark .doy-copy-btn {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: #d4d4d8;
}
html.dark .doy-copy-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

/* Hide spin buttons */
input[type="number"].no-spinners::-webkit-inner-spin-button,
input[type="number"].no-spinners::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"].no-spinners {
    -moz-appearance: textfield;
}

/* Milestone table */
.doy-table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
}
.doy-th {
    padding: 0.625rem 0.875rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #71717a;
    border-bottom: 1px solid #e4e4e7;
}
html.dark .doy-th {
    color: #a1a1aa;
    border-color: rgba(255, 255, 255, 0.08);
}
.doy-td {
    padding: 0.625rem 0.875rem;
    font-size: 0.8125rem;
    color: #3f3f46;
    border-bottom: 1px solid rgba(228, 228, 231, 0.5);
}
html.dark .doy-td {
    color: #d4d4d8;
    border-color: rgba(255, 255, 255, 0.04);
}
.doy-row-current {
    background: rgba(245, 158, 11, 0.08);
    font-weight: 700;
}
html.dark .doy-row-current {
    background: rgba(245, 158, 11, 0.12);
}

