/* DwL Rezerwacje — Frontend Styles */

.dwl-front-wrap {
    font-family: 'Lato', sans-serif;
    /* max-width usunięty — szerokość kontroluje grid rodzica */
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ── Tytuł domku ── */
.dwl-front-house-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #2C4A2E;
    text-align: center;
    margin-bottom: 14px;
    letter-spacing: 0.01em;
}

/* ── Grid dwóch kalendarzy ── */
.dwl-kalendarze-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: stretch;
}
@media (max-width: 760px) {
    .dwl-kalendarze-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* ── Kalendarz ── */
.dwl-front-cal {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Nawigacja — brąz zamiast zieleni */
.dwl-front-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #8B5A2B;   /* brąz */
    color: #fff;
}
.dwl-front-cal-nav button {
    background: none;
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 0;
    font-size: 1.8rem;
    cursor: pointer;
    transition: opacity 0.2s;
    line-height: 1;
    font-family: 'Lato', sans-serif;
    flex-shrink: 0;
    opacity: 0.8;
    padding: 0;
}
.dwl-front-cal-nav button:hover { opacity: 1; background: none; }

/* Stała szerokość nazwy miesiąca — koniec ze skakaniem */
.dwl-front-month-label {
    font-family: 'Lato', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    /* Szerszy od najdłuższej nazwy (Październik YYYY = ok. 160px) */
    min-width: 180px;
    display: inline-block;
}

/* ── Nazwy dni ── */
.dwl-front-day-names {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: rgba(139,90,43,0.07);
}
.dwl-front-day-names div {
    text-align: center;
    padding: 8px 4px;
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(44,74,46,0.8);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ── Siatka dni ── */
.dwl-front-cells {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 6px;
    background: rgba(44,74,46,0.04);
}
.dwl-front-cell {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    background: #fff;
    color: #1a2e1b;
    transition: all 0.15s;
    position: relative;
    user-select: none;
}
.dwl-front-cell.empty       { background: transparent; cursor: default; }
.dwl-front-cell.past        { color: #707070; cursor: default; background: #fafafa; }
.dwl-front-cell.booked      { background: #fdf0f0; color: #c0392b; cursor: not-allowed; }
.dwl-front-cell.today       { font-weight: 700; outline: 2px solid #8B5A2B; outline-offset: -2px; }
.dwl-front-cell.selected    { background: #8B5A2B; color: #fff; }
.dwl-front-cell.in-range    { background: rgba(139,90,43,0.10); border-radius: 0; }
.dwl-front-cell.range-start { background: #8B5A2B; color: #fff; border-radius: 6px 0 0 6px; }
.dwl-front-cell.range-end   { background: #8B5A2B; color: #fff; border-radius: 0 6px 6px 0; }
.dwl-front-cell:not(.past):not(.booked):not(.empty):not(.selected):not(.range-start):not(.range-end):hover {
    background: rgba(44,74,46,0.07);
}
.dwl-front-cell.selected:hover,
.dwl-front-cell.range-start:hover,
.dwl-front-cell.range-end:hover { background: #7a4f25; }

/* ── Legenda ── */
.dwl-front-legend {
    display: flex;
    gap: 20px;
    padding: 10px 16px;
    font-size: 0.72rem;
    color: rgba(44,74,46,0.75);
    border-top: 1px solid rgba(44,74,46,0.07);
}
.dwl-dot {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}
.dwl-dot-free   { background: #fff; border: 1.5px solid rgba(44,74,46,0.2); }
.dwl-dot-booked { background: #fdf0f0; border: 1.5px solid #c0392b; }
.dwl-dot-sel    { background: #8B5A2B; }

/* ── Info o datach ── */
.dwl-front-pick-info {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(44,74,46,0.06);
    border-radius: 8px;
    font-size: 0.85rem;
    color: #2C4A2E;
    font-weight: 600;
}

/* ── Komunikat walidacyjny (np. min. liczba nocy, zajęte daty) ── */
.dwl-front-validation-msg {
    display: none;
    margin-top: 16px;
    padding: 12px 16px;
    background: #fdf0f0;
    border: 1px solid rgba(192,57,43,0.25);
    border-radius: 8px;
    font-size: 0.85rem;
    color: #a23b2e;
    font-weight: 600;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .2s ease, transform .2s ease;
}
.dwl-front-validation-msg.visible {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}
.dwl-front-validation-msg::before {
    content: '⚠';
    flex-shrink: 0;
    line-height: 1;
}

/* ── Przycisk CTA — domyślnie ukryty, pojawia się przez JS ── */
.dwl-front-cta-wrap {
    margin-top: auto;
    padding-top: 16px;
    text-align: center;
    display: none; /* ukryty do czasu wyboru dat */
}
.dwl-front-cta-wrap.visible {
    display: block;
}
.dwl-front-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: #8B5A2B;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 8px;
    border: 2px solid transparent;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: background 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.dwl-front-cta-btn:hover {
    background: #c4946c;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 90, 43, 0.35);
}
.dwl-front-cta-btn:active { transform: translateY(0); box-shadow: none; }

/* ── Formularz ── */
.dwl-front-form {
    margin-top: 20px;
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.dwl-front-form-title {
    margin: 0 0 12px;
    font-family: 'Playfair Display', serif;
    color: #2C4A2E;
    font-size: 1.2rem;
}
.dwl-front-dates-summary {
    background: rgba(44,74,46,0.06);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: #2C4A2E;
    font-weight: 600;
    margin-bottom: 16px;
}
.dwl-front-fields { display: flex; flex-direction: column; gap: 12px; }
.dwl-front-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(44,74,46,0.6);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.dwl-front-field input,
.dwl-front-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid rgba(44,74,46,0.15);
    border-radius: 8px;
    font-family: inherit;
    /* 16px, nie 0.88rem/14px — pod tym progiem iOS Safari/Chrome
       automatycznie przybliża widok po kliknięciu pola. */
    font-size: 16px;
    color: #1a2e1b;
    background: #fff;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.dwl-front-field input:focus,
.dwl-front-field textarea:focus { border-color: #8B5A2B; }
.dwl-front-form-error {
    margin-top: 10px;
    padding: 10px 14px;
    background: #fde8e8;
    color: #c0392b;
    border-radius: 6px;
    font-size: 0.83rem;
    font-weight: 600;
}
.dwl-front-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.dwl-front-btn-primary {
    flex: 1;
    padding: 14px 28px;
    background: #8B5A2B;
    color: #fff;
    border: 2px solid transparent;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-family: 'Lato', sans-serif;
    transition: background 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.dwl-front-btn-primary:hover  {
    background: #c4946c;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 90, 43, 0.35);
}
.dwl-front-btn-primary:active { transform: translateY(0); box-shadow: none; }
.dwl-front-btn-outline {
    padding: 13px 18px;
    background: none;
    border: 1.5px solid rgba(44,74,46,0.25);
    border-radius: 8px;
    color: #2C4A2E;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Lato', sans-serif;
}
.dwl-front-btn-outline:hover { border-color: #2C4A2E; }

/* ── Sukces ── */
.dwl-front-success {
    text-align: center;
    padding: 40px 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-top: 20px;
}
.dwl-front-success-icon {
    width: 64px; height: 64px;
    background: #2C4A2E;
    color: #fff;
    font-size: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.dwl-front-success h3 {
    font-family: 'Playfair Display', serif;
    color: #2C4A2E;
    font-size: 1.4rem;
    margin: 0 0 8px;
}
.dwl-front-success p {
    color: rgba(44,74,46,0.7);
    font-size: 0.9rem;
    margin: 0 0 20px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Mobile ── */
@media (max-width: 480px) {
    .dwl-front-cell { height: 36px; font-size: 0.78rem; }
    .dwl-front-cta-btn { padding: 13px 24px; }
}

/* ── Inline badge "Wyślij zapytanie" w opisie ── */
.dwl-inline-btn {
    display: inline;
    padding: 1px 4px;
    background: #8B5A2B;
    color: #fff;
    border-radius: 3px;
    font-size: 0.78em;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: baseline;
    white-space: nowrap;
}

/* Nawigacja miesięcy — stan zablokowany na granicach zakresu */
.dwl-front-prev:disabled,
.dwl-front-next:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}
