/*
 * /rezervace/rezervace_widget.css
 * Samostatný přenositelný styl pro veřejný ceník pokojů a rezervační kalendář (Rezeo-style).
 * Nezávislý na hlavním CSS webu – obsahuje vlastní fallback proměnné.
 */

.rez-public-module {
    --rez-primary: var(--primary, #1b365d);
    --rez-accent: var(--accent, #0284c7);
    --rez-accent-hover: var(--accent-hover, #0369a1);
    --rez-bg-card: var(--bg-card, #ffffff);
    --rez-text-main: var(--text-main, #1e293b);
    --rez-text-muted: var(--text-muted, #64748b);
    --rez-border: var(--border-color, #e2e8f0);
    --rez-radius-lg: var(--radius-lg, 14px);
    --rez-radius-md: var(--radius-md, 10px);
    --rez-shadow-sm: var(--shadow-sm, 0 2px 8px rgba(15, 23, 42, 0.06));
    --rez-shadow-md: var(--shadow-md, 0 10px 25px rgba(15, 23, 42, 0.09));
    color: var(--rez-text-main);
}

.rez-public-module * {
    box-sizing: border-box;
}

/* Tlačítka uvnitř rezervačního modulu (fungují i na webu bez vlastního .btn) */
.rez-public-module .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.75rem 1.35rem;
    border-radius: 10px;
    font-size: 0.96rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    font-family: inherit;
}

.rez-public-module .btn-primary {
    background: var(--rez-accent);
    color: #fff;
}

.rez-public-module .btn-primary:hover {
    background: var(--rez-accent-hover);
    transform: translateY(-1px);
}

/* Karty pokojů (Seznam bytových jednotek a ceník) */
.price-banner {
    background: #eff6ff;
    border-left: 5px solid var(--rez-accent);
    padding: 1.15rem 1.35rem;
    border-radius: var(--rez-radius-md);
    margin-bottom: 1.75rem;
    color: #1e3a8a;
}

.rooms-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.room-card {
    background: var(--rez-bg-card);
    border: 1px solid var(--rez-border);
    border-radius: var(--rez-radius-lg);
    box-shadow: var(--rez-shadow-sm);
    overflow: hidden;
}

.room-card-header {
    background: var(--rez-primary);
    color: #fff;
    padding: 0.85rem 1.35rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.room-card-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.room-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.spec-badge {
    background: rgba(255, 255, 255, 0.16);
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.83rem;
    font-weight: 600;
}

.room-card-body {
    padding: 1.35rem;
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 1.5rem;
    align-items: center;
}

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

.room-thumbs img {
    width: 100%;
    height: 92px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--rez-border);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.room-thumbs img:hover {
    transform: scale(1.04);
}

.room-desc-col p {
    margin: 0 0 1rem;
    color: var(--rez-text-main);
}

/* Rezeo-style rezervační widget */
.rezeo-widget {
    display: grid;
    grid-template-columns: 1fr 370px;
    gap: 1.75rem;
    align-items: start;
}

.rezeo-main {
    background: var(--rez-bg-card);
    border: 1px solid var(--rez-border);
    border-radius: var(--rez-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--rez-shadow-sm);
}

.rezeo-step-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--rez-primary);
    margin: 0 0 1rem;
}

.step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--rez-accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    font-weight: 800;
}

/* Přepínač pokojů v rezervaci */
.unit-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.unit-btn {
    text-align: left;
    background: #f8fafc;
    border: 2px solid var(--rez-border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.unit-btn:hover {
    border-color: #93c5fd;
}

.unit-btn.active {
    background: #eff6ff;
    border-color: var(--rez-accent);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.14);
}

.unit-btn-name {
    display: block;
    font-weight: 800;
    font-size: 1rem;
    color: var(--rez-primary);
}

.unit-btn-meta {
    display: block;
    font-size: 0.82rem;
    color: var(--rez-text-muted);
    margin-top: 0.2rem;
}

/* Kalendář v Rezeo stylu */
.rezeo-cal-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    font-size: 0.83rem;
    color: var(--rez-text-muted);
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.legend-box {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    display: inline-block;
}

.l-free { background: #dcfce7; border: 1px solid #86efac; }
.l-selected { background: #0284c7; }
.l-booked { background: #ef4444; }
.l-pending { background: #f59e0b; }
.l-closed { background: #cbd5e1; border: 1px solid #94a3b8; }
.l-split {
    background: linear-gradient(135deg, #ef4444 48%, #ffffff 48%, #ffffff 52%, #dcfce7 52%);
    border: 1px solid #94a3b8;
}

/* Informační lišta k sezónám a jarním prázdninám */
.season-info-bar {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.35rem;
}

.season-info-item {
    background: #f8fafc;
    border: 1px solid var(--rez-border);
    border-left: 4px solid var(--rez-accent);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--rez-text-main);
}

.season-info-spring {
    background: #fffbeb;
    border-color: #fde68a;
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

.rezeo-months-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
    gap: 1.25rem;
}

.pub-month {
    border: 1px solid var(--rez-border);
    border-radius: 10px;
    padding: 0.9rem;
    background: #fcfcfd;
}

.pub-month-header {
    text-align: center;
    font-weight: 800;
    color: var(--rez-primary);
    margin-bottom: 0.6rem;
}

.pub-weekdays,
.pub-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.pub-weekday {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--rez-text-muted);
    padding: 0.2rem 0;
}

.pub-day {
    height: 38px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.87rem;
    font-weight: 600;
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534;
    cursor: pointer;
    user-select: none;
    transition: all 0.1s ease;
}

.pub-day.empty {
    background: transparent;
    border-color: transparent;
    cursor: default;
}

.pub-day.past {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
}

.pub-day.booked {
    background: #ef4444;
    border-color: #dc2626;
    color: #ffffff;
    cursor: not-allowed;
}

.pub-day.pending {
    background: #f59e0b;
    border-color: #d97706;
    color: #ffffff;
    cursor: not-allowed;
}

.pub-day.closed {
    background: repeating-linear-gradient(
        -45deg,
        #e2e8f0,
        #e2e8f0 5px,
        #cbd5e1 5px,
        #cbd5e1 10px
    );
    border-color: #94a3b8;
    color: #475569;
    cursor: not-allowed;
}

.pub-day.split-day {
    border-color: #64748b;
    color: #0f172a;
    font-weight: 800;
    text-shadow: 0 0 4px #ffffff, 0 0 6px #ffffff;
}

.pub-day.selected-start,
.pub-day.selected-end {
    background: var(--rez-accent);
    border-color: #0369a1;
    color: #fff;
    font-weight: 800;
}

.pub-day.in-range {
    background: #bae6fd;
    border-color: #38bdf8;
    color: #0c4a6e;
}

.spring-warning-box {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-left: 4px solid #f59e0b;
    color: #92400e;
    padding: 0.7rem 0.85rem;
    border-radius: 8px;
    font-size: 0.84rem;
    margin-bottom: 0.85rem;
    line-height: 1.45;
}

.antispam-field {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.6rem 0.7rem;
}

/* Pravý souhrnný panel Rezeo */
.rezeo-sidebar {
    background: var(--rez-bg-card);
    border: 2px solid var(--rez-border);
    border-radius: var(--rez-radius-lg);
    padding: 1.4rem;
    box-shadow: var(--rez-shadow-md);
    position: sticky;
    top: 4.8rem;
}

.summary-box {
    background: #f8fafc;
    border: 1px solid var(--rez-border);
    border-radius: 10px;
    padding: 0.9rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    border-bottom: 1px dashed #e2e8f0;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-price-box {
    margin-top: 0.55rem;
    padding-top: 0.55rem;
    border-top: 2px solid #cbd5e1;
}

.summary-price-main {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
}

.summary-price-value {
    font-size: 1.15rem;
    color: var(--rez-accent-hover);
    font-weight: 800;
}

.summary-price-detail {
    font-size: 0.78rem;
    color: #334155;
    margin-top: 0.2rem;
    font-weight: 600;
}

.summary-price-note {
    font-size: 0.74rem;
    color: var(--rez-text-muted);
    margin-top: 0.25rem;
    line-height: 1.35;
}

.form-field {
    margin-bottom: 0.75rem;
}

.form-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--rez-text-main);
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
}

.booking-feedback {
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.85rem;
    display: none;
}

.booking-feedback.success {
    display: block;
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.booking-feedback.error {
    display: block;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

@media (max-width: 960px) {
    .room-card-body,
    .rezeo-widget {
        grid-template-columns: 1fr;
    }
    .rezeo-sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    .rez-public-module .btn {
        padding: 0.5rem 0.9rem;
        font-size: 0.84rem;
        border-radius: 8px;
        gap: 0.35rem;
    }

    .rezeo-cal-toolbar .btn {
        padding: 0.36rem 0.7rem !important;
        font-size: 0.78rem !important;
    }

    .price-banner {
        padding: 0.85rem 1rem;
        font-size: 0.88rem;
        margin-bottom: 1.25rem;
    }

    .room-card-header {
        padding: 0.7rem 1rem;
        gap: 0.55rem;
    }

    .room-card-header h3 {
        font-size: 1.02rem;
    }

    .spec-badge {
        font-size: 0.75rem;
        padding: 0.2rem 0.55rem;
    }

    .room-card-body {
        padding: 1rem;
        gap: 1rem;
    }

    .room-thumbs img {
        height: 74px;
    }

    .rezeo-main,
    .rezeo-sidebar {
        padding: 1rem;
    }

    .rezeo-step-title {
        font-size: 0.98rem;
        margin-bottom: 0.75rem;
    }

    .step-num {
        width: 24px;
        height: 24px;
        font-size: 0.78rem;
    }

    .unit-selector {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        margin-bottom: 1.25rem;
    }

    .unit-btn {
        padding: 0.6rem 0.8rem;
        border-radius: 8px;
    }

    .unit-btn-name {
        font-size: 0.92rem;
    }

    .unit-btn-meta {
        font-size: 0.76rem;
    }

    .season-info-item {
        padding: 0.6rem 0.8rem;
        font-size: 0.83rem;
    }

    .pub-month {
        padding: 0.7rem;
    }

    .pub-day {
        height: 34px;
        font-size: 0.81rem;
    }
}

