/* JZ Booking – v1.5.1 – styled like janzubek.cz (Apple-like, clean) */
/* Colors: primary #044E17, heading #03200F, bg #F5F5F7, white #FFFFFF, body #4B5563, outline #E5E7EB */
/* Font: Inter */

/* ── Container – no box, blends into page ─────────────────── */
.jzb-container {
    max-width: 520px;
    margin: 0 auto;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    color: #4B5563;
    background: transparent;
    border: none;
}

.jzb-content {
    padding: 0;
}

/* ── Language switcher ──────────────────────────────────────── */
.jzb-lang-switcher {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    margin-bottom: 1.25rem;
}

.jzb-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 13px;
    background: #F5F5F7;
    border: none;
    border-radius: 100px;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 500;
    color: #4B5563;
    cursor: pointer;
    -webkit-transition: all 0.15s;
    transition: all 0.15s;
    line-height: 1.2;
}
.jzb-lang-btn:not(.jzb-lang-active):hover {
    background: #E5E7EB;
    color: #03200F;
}
.jzb-lang-btn.jzb-lang-active {
    background: #044E17;
    color: #fff;
}

/* ── Steps ─────────────────────────────────────────────────── */
.jzb-step {
    display: none;
}
.jzb-step.jzb-active {
    display: block;
    animation: jzbFadeIn 0.2s ease;
}

@keyframes jzbFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Back button ────────────────────────────────────────────── */
.jzb-back {
    background: none;
    border: none;
    color: #044E17;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    margin-bottom: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.15s;
}
.jzb-back:hover {
    opacity: 0.7;
}

/* ── Calendar ──────────────────────────────────────────────── */
.jzb-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.jzb-cal-month {
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    color: #03200F;
    letter-spacing: -0.2px;
}

.jzb-cal-prev,
.jzb-cal-next {
    background: #F5F5F7;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #03200F;
    font-size: 1rem;
    transition: background 0.15s;
}
.jzb-cal-prev:hover,
.jzb-cal-next:hover {
    background: #E5E7EB;
}

.jzb-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.jzb-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.jzb-day {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    gap: 3px;
    height: 44px;
    min-height: 44px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 400;
    border: none;
    background: none;
    color: #9CA3AF;
    cursor: default;
    -webkit-transition: all 0.15s;
    transition: all 0.15s;
    font-family: inherit;
    box-sizing: border-box;
}

/* Semafor tečky */
.jzb-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    display: block;
    flex-shrink: 0;
}
.jzb-dot-available { background: #22C55E; }
.jzb-dot-limited   { background: #F59E0B; }

/* Shimmer loading */
.jzb-day-loading {
    cursor: wait;
    color: transparent;
    background: linear-gradient(
        90deg,
        #F5F5F7 25%,
        #EBEBEB 50%,
        #F5F5F7 75%
    );
    background-size: 300% 100%;
    border-radius: 10px;
    -webkit-animation: jzbShimmer 1.4s ease-in-out infinite;
    animation: jzbShimmer 1.4s ease-in-out infinite;
}
@-webkit-keyframes jzbShimmer {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
@keyframes jzbShimmer {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* Progress bar */
.jzb-cal-progress {
    height: 2px;
    background: #F5F5F7;
    border-radius: 2px;
    margin-bottom: 12px;
    overflow: hidden;
}
.jzb-cal-progress-bar {
    height: 100%;
    width: 30%;
    background: #044E17;
    border-radius: 2px;
    -webkit-animation: jzbProgress 1.2s ease-in-out infinite;
    animation: jzbProgress 1.2s ease-in-out infinite;
}
@-webkit-keyframes jzbProgress {
    0%   { margin-left: -30%; }
    100% { margin-left: 100%; }
}
@keyframes jzbProgress {
    0%   { margin-left: -30%; }
    100% { margin-left: 100%; }
}

.jzb-day.jzb-day-available {
    cursor: pointer;
    color: #03200F;
    font-weight: 500;
    background: #F5F5F7;
}
.jzb-day.jzb-day-available:hover {
    background: #044E17;
    color: #fff;
}

.jzb-day.jzb-day-disabled {
    color: #D1D5DB;
    background: none;
}

.jzb-day.jzb-day-today {
    border: 1.5px solid #044E17;
    color: #044E17;
    font-weight: 600;
}

.jzb-day.jzb-day-selected {
    background: #044E17;
    color: #fff;
    font-weight: 600;
}

/* ── Time slots ─────────────────────────────────────────────── */
.jzb-selected-date {
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: #03200F;
    margin: 0 0 1rem;
}

.jzb-slots-loading {
    text-align: center;
    padding: 2rem;
    color: #9CA3AF;
    font-size: 0.875rem;
    display: none;
}
.jzb-slots-loading.jzb-active {
    display: block;
}

.jzb-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    gap: 6px;
}

.jzb-slot {
    padding: 0.65rem 0.5rem;
    border: none;
    border-radius: 100px;
    background: #F5F5F7;
    text-align: center;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    color: #03200F;
    transition: all 0.15s;
}
.jzb-slot:hover {
    background: #044E17;
    color: #fff;
}
.jzb-slot.jzb-slot-selected {
    background: #044E17;
    color: #fff;
}

.jzb-no-slots {
    text-align: center;
    padding: 2rem;
    color: #9CA3AF;
    font-size: 0.875rem;
}

/* ── Type toggle ────────────────────────────────────────────── */
.jzb-type-toggle {
    display: flex;
    gap: 6px;
    margin-top: 0.35rem;
}

.jzb-type-btn {
    flex: 1;
    padding: 0.6rem 0.5rem;
    border: 1.5px solid #E5E7EB;
    border-radius: 100px;
    background: #fff;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    color: #4B5563;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.jzb-type-btn:hover {
    border-color: #044E17;
    color: #044E17;
}
.jzb-type-btn.jzb-type-active {
    background: #044E17;
    border-color: #044E17;
    color: #fff;
}

.jzb-field-hint {
    font-size: 0.77rem;
    color: #9CA3AF;
    margin: 0.25rem 0 0;
}

.jzb-map-preview {
    margin-top: 0.75rem;
}

.jzb-map-link {
    display: inline-block;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: #044E17;
    text-decoration: none;
    font-weight: 500;
}
.jzb-map-link:hover {
    text-decoration: underline;
}

/* ── Form ───────────────────────────────────────────────────── */
.jzb-selected-slot {
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: #03200F;
    margin: 0 0 1.25rem;
}

.jzb-field {
    margin-bottom: 0.875rem;
}

.jzb-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: #03200F;
    margin-bottom: 0.3rem;
}

.jzb-field input,
.jzb-field textarea {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1.5px solid #E5E7EB;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    color: #03200F;
    background: #fff;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.jzb-field input:focus,
.jzb-field textarea:focus {
    outline: none;
    border-color: #044E17;
}
.jzb-field input.jzb-invalid,
.jzb-field textarea.jzb-invalid {
    border-color: #DC2626;
}

/* GDPR */
.jzb-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: #4B5563;
    line-height: 1.5;
}

.jzb-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    margin-top: 2px;
    accent-color: #044E17;
    cursor: pointer;
}

.jzb-gdpr-error .jzb-checkbox-label {
    color: #DC2626;
}
.jzb-gdpr-error .jzb-checkbox-label input {
    outline: 2px solid #DC2626;
    border-radius: 3px;
}

/* Submit button – pill shape */
.jzb-submit {
    width: 100%;
    padding: 0.85rem 1.5rem;
    background: #044E17;
    color: #fff;
    border: none;
    border-radius: 100px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
    margin-top: 0.75rem;
    letter-spacing: -0.01em;
}
.jzb-submit:hover {
    opacity: 0.85;
}
.jzb-submit:disabled {
    background: #D1D5DB;
    cursor: not-allowed;
    opacity: 1;
}

/* ── Success ─────────────────────────────────────────────────── */
.jzb-success {
    text-align: center;
    padding: 1.5rem 0;
}

.jzb-success-icon {
    width: 52px;
    height: 52px;
    background: #044E17;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin: 0 auto 1rem;
}

.jzb-success h3 {
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    color: #03200F;
    margin: 0 0 0.4rem;
    letter-spacing: -0.2px;
}

.jzb-success p {
    color: #4B5563;
    font-size: 0.875rem;
    margin: 0.2rem 0;
    line-height: 1.55;
}

.jzb-success-detail {
    color: #03200F !important;
    font-weight: 600;
}

.jzb-new-booking {
    margin-top: 1.5rem;
    padding: 0.65rem 1.5rem;
    background: transparent;
    color: #044E17;
    border: 1.5px solid #044E17;
    border-radius: 100px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.jzb-new-booking:hover {
    background: #044E17;
    color: #fff;
}

/* ── Honeypot ───────────────────────────────────────────────── */
.jzb-hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 560px) {
    .jzb-slots {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}
