.fewo-frontend-calendar {
    --fewo-free: #2e7d32;
    --fewo-booked: #c62828;
    --fewo-changeover: #ef6c00;
    --fewo-surface: #ffffff;
    --fewo-border: #e5e7eb;
    --fewo-text: #1f2937;
    --fewo-muted: #6b7280;

    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    border: 1px solid var(--fewo-border);
    border-radius: 16px;
    padding: 16px;
    color: var(--fewo-text);
    max-width: 820px;
    margin: 16px auto;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
    position: relative;
    overflow: hidden;
}

.fewo-frontend-calendar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(1200px 220px at 100% 0, rgba(255, 255, 255, 0.45), transparent 60%);
    pointer-events: none;
}

.fewo-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.fewo-title {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.3;
    letter-spacing: 0.01em;
}

.fewo-description {
    margin: 4px 0 0;
    color: var(--fewo-muted);
    font-size: 0.95rem;
}

.fewo-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.fewo-nav-btn {
    background: #fff;
    border: 1px solid var(--fewo-border);
    border-radius: 10px;
    min-width: 34px;
    height: 34px;
    cursor: pointer;
    font-size: 16px;
    color: var(--fewo-text);
    transition: transform 0.12s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.fewo-nav-btn:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(17, 24, 39, 0.08);
}

.fewo-month-label {
    font-weight: 600;
    min-width: 120px;
    text-align: center;
}

.fewo-grid-wrap {
    border: 1px solid var(--fewo-border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--fewo-surface);
}

.fewo-weekdays,
.fewo-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.fewo-weekday {
    text-align: center;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 8px;
    border-bottom: 1px solid var(--fewo-border);
    background: #f8fafc;
}

.fewo-day {
    min-height: 64px;
    border-right: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    padding: 8px;
    position: relative;
    transition: transform 0.12s ease, filter 0.12s ease;
}

.fewo-day:nth-child(7n) {
    border-right: none;
}

.fewo-empty {
    background: #fcfcfd;
}

.fewo-day-number {
    font-weight: 700;
    font-size: 0.95rem;
}

.fewo-day:hover {
    filter: saturate(1.03);
}

.fewo-selected-day {
    box-shadow: inset 0 0 0 2px #1e40af;
}

.fewo-unselectable-day {
    cursor: not-allowed;
    opacity: 0.82;
}

.fewo-status-free {
    background: color-mix(in srgb, var(--fewo-free) 14%, white);
}

.fewo-status-booked {
    background: color-mix(in srgb, var(--fewo-booked) 14%, white);
}

.fewo-status-changeover {
    background: color-mix(in srgb, var(--fewo-changeover) 18%, white);
}

.fewo-status-halfday {
    background: linear-gradient(to bottom right, color-mix(in srgb, var(--fewo-booked) 16%, white) 0 50%, color-mix(in srgb, var(--fewo-free) 16%, white) 50% 100%);
}

.fewo-status-halfday-reverse,
.fewo-status-halfday_reverse {
    background: linear-gradient(to bottom right, color-mix(in srgb, var(--fewo-free) 16%, white) 0 50%, color-mix(in srgb, var(--fewo-booked) 16%, white) 50% 100%);
}

.fewo-today {
    box-shadow: inset 0 0 0 2px #111827;
}

.fewo-legend {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.fewo-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: var(--fewo-muted);
}

.fewo-theme-ocean {
    --fewo-free: #0f766e;
    --fewo-booked: #b91c1c;
    --fewo-changeover: #ca8a04;
    --fewo-border: #cbd5e1;
    --fewo-text: #0f172a;
    --fewo-muted: #334155;
    background: linear-gradient(160deg, #e0f2fe 0%, #f0fdfa 46%, #ffffff 100%);
}

.fewo-theme-ocean .fewo-grid-wrap {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.fewo-theme-terracotta {
    --fewo-free: #2f855a;
    --fewo-booked: #c53030;
    --fewo-changeover: #b7791f;
    --fewo-border: #e7d7c9;
    --fewo-text: #3f2d20;
    --fewo-muted: #7a5d48;
    background: linear-gradient(165deg, #fff3e9 0%, #fff9f3 50%, #ffffff 100%);
}

.fewo-theme-terracotta .fewo-weekday {
    background: #fff8f2;
}

.fewo-theme-modern {
    --fewo-free: #2e7d32;
    --fewo-booked: #c62828;
    --fewo-changeover: #ef6c00;
    --fewo-border: #e5e7eb;
    --fewo-text: #1f2937;
    --fewo-muted: #6b7280;
}

.fewo-legend-color {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
}

.fewo-legend-color.fewo-status-free {
    background: var(--fewo-free);
}

.fewo-legend-color.fewo-status-booked {
    background: var(--fewo-booked);
}

.fewo-legend-color.fewo-status-changeover {
    background: var(--fewo-changeover);
}

.fewo-legend-color.fewo-status-halfday {
    background: linear-gradient(to bottom right, var(--fewo-booked) 0 50%, var(--fewo-free) 50% 100%);
}

.fewo-legend-color.fewo-status-halfday-reverse {
    background: linear-gradient(to bottom right, var(--fewo-free) 0 50%, var(--fewo-booked) 50% 100%);
}

.fewo-legend-color.fewo-today-mark {
    background: #111827;
}

.fewo-request-feedback {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.92rem;
    border: 1px solid transparent;
}

.fewo-request-feedback.is-success {
    background: #ecfdf3;
    border-color: #a7f3d0;
    color: #065f46;
}

.fewo-request-feedback.is-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.fewo-request-box {
    margin-top: 14px;
    border: 1px solid var(--fewo-border);
    border-radius: 12px;
    background: #fff;
    padding: 12px;
}

.fewo-request-box h4 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.fewo-request-hint {
    margin: 0 0 12px;
    color: var(--fewo-muted);
    font-size: 0.88rem;
}

.fewo-request-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.fewo-request-grid label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.86rem;
    color: var(--fewo-muted);
}

.fewo-request-grid input,
.fewo-request-grid textarea {
    border: 1px solid var(--fewo-border);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.92rem;
    color: var(--fewo-text);
    background: #fff;
}

.fewo-request-grid textarea {
    resize: vertical;
}

.fewo-request-full {
    grid-column: 1 / -1;
}

.fewo-request-submit {
    margin-top: 12px;
    background: #1d4ed8;
    border: 1px solid #1d4ed8;
    color: #fff;
    border-radius: 9px;
    padding: 9px 14px;
    font-weight: 600;
    cursor: pointer;
}

.fewo-request-submit:hover {
    background: #1e40af;
    border-color: #1e40af;
}

.fewo-request-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.fewo-hp-wrap {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.fewo-required {
    color: #dc2626;
    margin-left: 2px;
}

.fewo-input-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}

.fewo-field-error {
    display: none;
    color: #dc2626;
    font-size: 0.78rem;
    margin-top: 2px;
}

.fewo-form-feedback {
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.92rem;
    border: 1px solid transparent;
}

@media (max-width: 680px) {
    .fewo-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .fewo-nav {
        width: 100%;
        justify-content: space-between;
    }

    .fewo-day {
        min-height: 48px;
        padding: 6px;
    }

    .fewo-day-number {
        font-size: 0.88rem;
    }

    .fewo-request-grid {
        grid-template-columns: 1fr;
    }
}
