/**
 * Press Start Party Booking — front-end styles.
 * Matched to pressstartbar.com: black background, bright cyan pixel
 * headings ('Press Start 2P'), white body text, red buttons.
 */

.psb-wrap {
    background: #000;
    color: #fff;
    padding: 20px;
    font-family: inherit;
}

.psb-heading,
.psb-subheading {
    font-family: 'Press Start 2P', cursive;
    color: #00e5ff;
    font-weight: normal;
    line-height: 1.4;
}

.psb-heading {
    font-size: 22px;
    text-align: center;
}

.psb-subheading {
    font-size: 13px;
}

.psb-form {
    background: #2a77bd;
    padding: 4px;
}

.psb-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    background: #000;
}

.psb-col {
    flex: 1 1 320px;
    padding: 14px;
    box-sizing: border-box;
}

.psb-field {
    display: block;
    margin: 0 0 12px;
    color: #fff;
}

/* The [hidden] attribute must win over .psb-field's display:block,
   or toggled rows (e.g. pizza selects) stay visible. */
.psb-form [hidden] {
    display: none !important;
}

.psb-field input[type="text"],
.psb-field input[type="email"],
.psb-field input[type="tel"],
.psb-field input[type="number"],
.psb-field select,
.psb-field textarea {
    display: block;
    width: 100%;
    max-width: 340px;
    margin-top: 4px;
    font-size: 18px;
    box-sizing: border-box;
    color: #ffffff;
    background: #111;
}

/* Calendar date picker (rendered in flow under the date field). The ID
   selector deliberately gives the readonly display the same dark control
   treatment as the form's text inputs, plus a native-picker-style glyph. */
#psb-date-display {
    display: block;
    width: 100%;
    max-width: 340px;
    margin-top: 4px;
    padding-right: 36px;
    font-size: 18px;
    box-sizing: border-box;
    color: #ffffff;
    background: #111;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23bbbbbb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M3 10h18'/%3E%3C/svg%3E");
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 20px 20px;
    cursor: pointer;
}

#psb-date-display::placeholder {
    color: #aaaaaa;
    opacity: 1;
}

.psb-calendar {
    background: #111;
    border: 1px solid #333;
    color: #fff;
    width: 320px;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px;
    margin-top: 6px;
}

.psb-cal-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.psb-cal-nav {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    font-size: 18px;
    line-height: 1;
    color: #fff;
    background: #222;
    border: 1px solid #444;
    cursor: pointer;
}

.psb-cal-nav[disabled] {
    color: #555;
    cursor: default;
}

.psb-calendar .psb-cal-head select {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
    font-size: 16px;
    color: #ffffff;
    background: #111;
}

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

.psb-cal-dow {
    text-align: center;
    font-size: 12px;
    color: #aaa;
    padding: 2px 0;
}

.psb-cal-day {
    height: 38px;
    padding: 0;
    font-size: 15px;
    text-align: center;
    color: #fff;
    background: transparent;
    border: 1px solid transparent;
    box-sizing: border-box;
    cursor: pointer;
}

.psb-cal-day:hover:not([disabled]) {
    background: #222;
}

.psb-cal-day[disabled] {
    color: #555;
    cursor: default;
}

/* Adjacent-month spill days: muted next to the current month's days,
   but a bookable spill day stays alive (hover + pointer, like any
   enabled day) and selects its real date when clicked. */
.psb-cal-day.psb-cal-spill {
    color: #999;
    cursor: pointer;
}

.psb-cal-today {
    outline: 2px solid #00e5ff;
    outline-offset: -2px;
}

/* Same red as the .psb-submit button. */
.psb-cal-selected {
    background: #d50000;
    color: #fff;
    font-weight: bold;
}

/* Unbookable days (incl. spill days) keep the dead grey — this comes
   last so it wins over the enabled-spill and selected rules above. */
.psb-cal-day[disabled] {
    color: #555;
    cursor: default;
}

/* The open dropdown list itself: white text on dark, not the
   browser/theme's unreadable grey-on-dark. */
.psb-form select option {
    color: #ffffff;
    background: #111;
}

.psb-gratuity {
    display: block;
    margin-top: 14px;
    color: #fff;
    line-height: 1.5;
}

.psb-slot {
    display: block;
    margin: 0 0 8px;
    color: #fff;
    font-size: 17px;
    cursor: pointer;
}

/* Interim state in the slot box while availability is being checked:
   spinner + "Checking Availability", swapped for the real slot HTML
   (or a plain retry message) when the request settles. */
.psb-checking {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    padding: 2px 0;
    color: #fff;
    font-size: 17px;
}

.psb-spinner {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    box-sizing: border-box;
    border: 3px solid #444;
    border-top-color: #00e5ff;
    border-radius: 50%;
    animation: psb-spin .8s linear infinite;
}

@keyframes psb-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Reduced motion: keep the feedback, just spin it much more slowly. */
@media (prefers-reduced-motion: reduce) {
    .psb-spinner {
        animation-duration: 2.4s;
    }
}

.psb-slot-date,
.psb-slot-area {
    font-family: 'Press Start 2P', cursive;
    font-size: 11px;
    color: #00e5ff;
    line-height: 1.6;
}

.psb-closed-note {
    color: #ff5252;
    font-weight: bold;
}

.psb-date-note {
    color: #ffd740;
}

.psb-submit {
    background: #d50000;
    color: #fff;
    border: 0;
    padding: 12px 28px;
    font-family: 'Press Start 2P', cursive;
    font-size: 13px;
    cursor: pointer;
}

.psb-submit:hover {
    background: #ff1744;
}

.psb-notice {
    padding: 12px 16px;
    margin: 0 0 16px;
    border: 2px solid #00e5ff;
    background: #111;
    color: #fff;
}

.psb-notice.psb-error {
    border-color: #d50000;
    color: #ff8a80;
}

.psb-notice.psb-success {
    border-color: #00e676;
}

.psb-notice h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 13px;
    color: #00e676;
    line-height: 1.6;
}

/* Honeypot: visually removed, still in the DOM for bots to find. */
.psb-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
