/*
 * Tischreservierung – Frontend
 * Layout & Styles 1:1 nach dem Nidair CF7-Formular (Kubio-Theme)
 * cf7-grid → 2 Spalten, cf7-col → Spalte, cf7-submit → Button-Zeile
 */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

/* ── root wrapper ── */
.nr-wrap {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #1a1a1a;
    max-width: 100%;
}

/* ══════════════════════════════════
   GRID – identisch zu .cf7-grid
══════════════════════════════════ */
.nr-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
}

.nr-col {
    /* nothing extra – fields stack naturally */
}

.nr-col p {
    margin: 0 0 18px 0;
}

/* ══════════════════════════════════
   LABELS – wie im CF7-Formular:
   label-Text oben, Input darunter,
   label ist ein Block-Element
══════════════════════════════════ */
.nr-wrap label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #1a1a1a;
    margin-bottom: 0;
    line-height: 1.6;
}

.nr-wrap label br {
    /* CF7 puts a <br> between label text and input – keep spacing natural */
    display: none;
}

/* ══════════════════════════════════
   INPUTS / SELECT / TEXTAREA
   Genau wie wpcf7-form-control:
   volle Breite, kein Radius, grauer
   Border, weisser Hintergrund
══════════════════════════════════ */
.nr-wrap input[type="text"],
.nr-wrap input[type="tel"],
.nr-wrap input[type="email"],
.nr-wrap input[type="number"],
.nr-wrap input[type="date"],
.nr-wrap input[type="time"],
.nr-wrap select,
.nr-wrap textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    margin-top: 4px;
    background-color: #ffffff;
    color: #1a1a1a;
    border: 1px solid #b0b0b0;
    border-radius: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .15s;
}

.nr-wrap input[type="text"]:focus,
.nr-wrap input[type="tel"]:focus,
.nr-wrap input[type="email"]:focus,
.nr-wrap input[type="number"]:focus,
.nr-wrap input[type="date"]:focus,
.nr-wrap input[type="time"]:focus,
.nr-wrap select:focus,
.nr-wrap textarea:focus {
    border-color: #555555;
    box-shadow: none;
}

/* Select: custom chevron */
.nr-wrap select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7'%3E%3Cpath d='M.5.5l5 5 5-5' stroke='%231a1a1a' stroke-width='1.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
    cursor: pointer;
}

/* Textarea – cf7-col rechts hat 10 rows */
.nr-wrap textarea {
    resize: vertical;
    min-height: 120px;
}

/* Number – kein spin-button */
.nr-wrap input[type="number"]::-webkit-inner-spin-button,
.nr-wrap input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.nr-wrap input[type="number"] { -moz-appearance: textfield; }

/* ══════════════════════════════════
   INVALID STATE
══════════════════════════════════ */
.nr-wrap input.nr-invalid,
.nr-wrap select.nr-invalid,
.nr-wrap textarea.nr-invalid {
    border-color: #cc0000;
}

.nr-field-error {
    display: block;
    font-size: 12px;
    color: #cc0000;
    margin-top: 3px;
}

/* ══════════════════════════════════
   ERROR BOX (top of form)
══════════════════════════════════ */
.nr-form-error {
    font-size: 13px;
    color: #cc0000;
    border: 1px solid #cc0000;
    padding: 8px 12px;
    margin-bottom: 14px;
    background: #fff5f5;
}

/* ══════════════════════════════════
   SUBMIT ROW – wie .cf7-submit
══════════════════════════════════ */
.nr-submit {
    margin-top: 4px;
}

.nr-submit p {
    margin: 0;
}

/* Button: identisch zu wpcf7-submit im Kubio-Theme
   → schwarzer Hintergrund, weisse Schrift, kein Radius,
     uppercase, Montserrat semibold                       */
.nr-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 28px;
    background-color: #1a1a1a;
    color: #ffffff;
    border: 1px solid #1a1a1a;
    border-radius: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
    line-height: 1.5;
    transition: background-color .2s, color .2s;
}

.nr-btn:hover {
    background-color: #3a3a3a;
    border-color: #3a3a3a;
    color: #ffffff;
}

.nr-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* spinner inside button */
.nr-btn-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: nr-spin .65s linear infinite;
}
@keyframes nr-spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════
   SUCCESS MESSAGE
══════════════════════════════════ */
.nr-success {
    padding: 32px 20px;
    border: 1px solid #b0b0b0;
    background: #fff;
    text-align: center;
}

.nr-check-icon {
    width: 48px;
    height: 48px;
    display: block;
    margin: 0 auto 14px;
}
.nr-check-icon circle { fill: none; stroke: #1a1a1a; stroke-width: 1.8; }
.nr-check-icon path   { fill: none; stroke: #1a1a1a; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.nr-success h3 {
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 0 0 8px;
    color: #1a1a1a;
}
.nr-success p {
    font-size: 13px;
    color: #555;
    margin: 0;
}

/* ══════════════════════════════════
   CHECKBOX / RADIO (custom fields)
══════════════════════════════════ */
.nr-wrap .nr-checkgroup,
.nr-wrap .nr-radiogroup {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-top: 5px;
}

.nr-wrap .nr-checkgroup label,
.nr-wrap .nr-radiogroup label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
}

.nr-wrap .nr-checkgroup input[type="checkbox"],
.nr-wrap .nr-radiogroup input[type="radio"] {
    width: 15px;
    height: 15px;
    margin: 0;
    padding: 0;
    border: 1px solid #b0b0b0;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #1a1a1a;
}

/* ══════════════════════════════════
   RESPONSIVE
══════════════════════════════════ */
@media (max-width: 640px) {
    .nr-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* ── Datumsfeld-Hinweis (Sperrdaten / Sonntag) ── */
.nr-field-hint {
    display: block;
    font-size: 11px;
    color: #888;
    margin-top: 5px;
    line-height: 1.4;
    font-style: italic;
}

/* ════════════════════════════════════════
   CUSTOM DATE-PICKER
════════════════════════════════════════ */

/* Display-Feld (readonly, sieht aus wie normales Input) */
#nr_datum_display {
    cursor: pointer !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='1.5'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    padding-right: 34px !important;
}
#nr_datum_display:focus {
    border-color: #555;
}

/* Picker-Container */
#nr-datepicker {
    background: #fff;
    border: 1px solid #b0b0b0;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
    width: 280px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    user-select: none;
}

/* Header */
.nr-dp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #1a1a1a;
    color: #fff;
}
.nr-dp-prev,
.nr-dp-next {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 6px;
    transition: color .15s;
}
.nr-dp-prev:hover, .nr-dp-next:hover { color: #ccc; }
.nr-dp-title { font-weight: 600; font-size: 13px; }

/* Wochentage */
.nr-dp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 6px 8px 2px;
    background: #f5f5f5;
}
.nr-dp-weekdays span {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #888;
}

/* Tage-Grid */
.nr-dp-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 4px 8px 8px;
    gap: 2px;
}
.nr-dp-day {
    text-align: center;
    padding: 6px 0;
    border-radius: 0;
    font-size: 13px;
    cursor: pointer;
    transition: background .12s;
    color: #1a1a1a;
}
.nr-dp-day:not(.nr-dp-past):not(.nr-dp-blocked):not(.nr-dp-sun):hover {
    background: #f0f0f0;
}
.nr-dp-day.nr-dp-selected {
    background: #1a1a1a !important;
    color: #fff !important;
}
.nr-dp-day.nr-dp-today:not(.nr-dp-selected) {
    font-weight: 700;
    text-decoration: underline;
}

/* Gesperrt / Vergangenheit */
.nr-dp-day.nr-dp-past {
    color: #ccc;
    cursor: default;
}
.nr-dp-day.nr-dp-sun {
    color: #ccc;
    cursor: not-allowed;
    background: #fafafa;
}
.nr-dp-day.nr-dp-blocked {
    color: #ccc;
    cursor: not-allowed;
    background: #fafafa;
    text-decoration: line-through;
}
.nr-dp-empty { cursor: default; }

/* Legende */
.nr-dp-legend {
    padding: 6px 10px 8px;
    font-size: 11px;
    color: #888;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.nr-dp-leg-blocked, .nr-dp-leg-sun {
    display: inline-block;
    width: 12px; height: 12px;
    background: #fafafa;
    border: 1px solid #ddd;
    vertical-align: middle;
}

/* Datumsfeld-Hinweis */
.nr-field-hint {
    display: block;
    font-size: 11px;
    color: #888;
    margin-top: 5px;
    line-height: 1.4;
    font-style: italic;
}
