/**
 * Training space booking calendar styles.
 */

.peibwa-booking {
    --pb-accent: #093A80;
    --pb-accent-soft: #ede9fe;
    --pb-border: #e2e4e7;
    --pb-muted: #646970;
    --pb-open: #1e7c34;
    max-width: 880px;
    margin: 0 auto;
    font-size: 15px;
    color: #1d2327;
}

.peibwa-booking * {
    box-sizing: border-box;
}

.peibwa-booking__summary {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 16px;
}

.peibwa-booking__price {
    font-size: 22px;
    font-weight: 700;
    color: var(--pb-accent);
}

.peibwa-booking__price-note {
    color: var(--pb-muted);
    font-size: 14px;
}

.peibwa-booking__gate {
    background: var(--pb-accent-soft);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.peibwa-booking__gate p {
    margin: 0;
    font-size: 14px;
}

.peibwa-booking__gate-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.peibwa-booking__gate-btn {
    display: inline-block;
    background: var(--pb-accent);
    color: #fff;
    border: 1px solid var(--pb-accent);
    border-radius: 6px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.peibwa-booking__gate-btn:hover,
.peibwa-booking__gate-btn:focus {
    background: #4c1d95;
    border-color: #4c1d95;
    color: #fff;
}

.peibwa-booking__gate-btn--ghost {
    background: transparent;
    color: var(--pb-accent);
}

.peibwa-booking__gate-btn--ghost:hover,
.peibwa-booking__gate-btn--ghost:focus {
    background: var(--pb-accent);
    color: #fff;
}

.peibwa-booking__layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 680px) {
    .peibwa-booking__layout {
        grid-template-columns: 1fr;
    }
}

/* Calendar */
.peibwa-booking__calendar {
    border: 1px solid var(--pb-border);
    border-radius: 10px;
    padding: 16px;
    background: #fff;
}

.peibwa-booking__cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.peibwa-booking__cal-title {
    font-weight: 600;
    font-size: 16px;
}

.peibwa-booking__nav {
    border: 1px solid var(--pb-border);
    background: #fff;
    border-radius: 6px;
    width: 34px;
    height: 34px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #1d2327;
}

.peibwa-booking__nav:hover:not(:disabled) {
    background: var(--pb-accent-soft);
    border-color: var(--pb-accent);
}

.peibwa-booking__nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.peibwa-booking__weekdays,
.peibwa-booking__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.peibwa-booking__weekdays {
    margin-bottom: 4px;
}

.peibwa-booking__weekdays span {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--pb-muted);
    padding: 4px 0;
}

.peibwa-booking__day {
    aspect-ratio: 1 / 1;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #f6f7f7;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 14px;
    cursor: default;
    color: #1d2327;
    padding: 0;
}

.peibwa-booking__day.is-empty {
    background: transparent;
}

.peibwa-booking__day.is-open {
    background: #fff;
    border-color: var(--pb-border);
    cursor: pointer;
}

.peibwa-booking__day.is-open:hover {
    border-color: var(--pb-accent);
    background: var(--pb-accent-soft);
}

.peibwa-booking__day.is-selected {
    background: var(--pb-accent) !important;
    border-color: var(--pb-accent) !important;
    color: #fff !important;
}

.peibwa-booking__day.is-disabled {
    color: #b0b3b8;
    cursor: not-allowed;
}

.peibwa-booking__day .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: transparent;
    position: relative;
}

.peibwa-booking__day.is-open .dot {
    background: var(--pb-open);
}

.peibwa-booking__day.is-selected .dot {
    background: #fff;
}

.peibwa-booking__legend {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    font-size: 12px;
    color: var(--pb-muted);
}

.peibwa-booking__legend .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
    position: relative;
}

.peibwa-booking__legend .dot--open {
    background: var(--pb-open);
}

.peibwa-booking__legend .dot--none {
    background: #c3c4c7;
}

/* Panel */
.peibwa-booking__panel {
    border: 1px solid var(--pb-border);
    border-radius: 10px;
    padding: 16px;
    background: #fff;
    min-height: 200px;
}

.peibwa-booking__hint {
    color: var(--pb-muted);
    font-size: 14px;
    margin: 0;
}

.peibwa-booking__slots-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 12px;
}

.peibwa-booking__slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
}

.peibwa-booking__slot {
    border: 1px solid var(--pb-border);
    border-radius: 6px;
    background: #fff;
    padding: 10px 6px;
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    color: #1d2327;
}

.peibwa-booking__slot:hover:not(:disabled) {
    border-color: var(--pb-accent);
    background: var(--pb-accent-soft);
}

.peibwa-booking__slot.is-selected {
    background: var(--pb-accent) !important;
    border-color: var(--pb-accent) !important;
    color: #fff !important;
}

.peibwa-booking__slot:disabled {
    background: #f0f0f1;
    color: #b0b3b8;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* Form */
.peibwa-booking__form {
    margin-top: 18px;
    border-top: 1px solid var(--pb-border);
    padding-top: 16px;
}

.peibwa-booking__form-title {
    font-size: 15px;
    margin: 0 0 12px;
}

.peibwa-booking__field {
    display: block;
    margin-bottom: 14px;
}

.peibwa-booking__field span {
    display: block;
    font-size: 13px;
    color: var(--pb-muted);
    margin-bottom: 4px;
}

.peibwa-booking__field textarea {
    width: 100%;
    border: 1px solid var(--pb-border);
    border-radius: 6px;
    padding: 8px 10px;
    font: inherit;
    resize: vertical;
}

.peibwa-booking__totals {
    font-size: 14px;
    margin-bottom: 14px;
}

.peibwa-booking__totals > div {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

.peibwa-booking__grand {
    border-top: 1px solid var(--pb-border);
    margin-top: 4px;
    padding-top: 8px !important;
    font-weight: 700;
}

.peibwa-booking__payment {
    margin-bottom: 14px;
}

.peibwa-booking__message {
    background: #fbeaea;
    color: #b32d2e;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 12px;
}

.peibwa-booking__submit {
    width: 100%;
    background: var(--pb-accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.peibwa-booking__submit:hover:not(:disabled) {
    background: #4c1d95;
}

.peibwa-booking__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Success */
.peibwa-booking__success {
    text-align: center;
    padding: 24px 12px;
}

.peibwa-booking__success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #edf7ed;
    color: var(--pb-open);
    font-size: 30px;
    line-height: 56px;
    margin: 0 auto 12px;
}

.peibwa-booking__success h3 {
    margin: 0 0 8px;
}

.peibwa-booking__success p {
    color: var(--pb-muted);
    margin: 0;
}

.peibwa-booking__cta {
    display: inline-block;
    margin-top: 10px;
    background: var(--pb-accent);
    color: #fff;
    border-radius: 6px;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 600;
}

.peibwa-booking__cta:hover {
    background: var(--color-secondary, #6F5EAE);
    color: #fff !important;
}

.peibwa-booking.is-loading {
    opacity: 0.6;
    pointer-events: none;
}
