/* ============================================================
   OpenResa Sync — Reservation Form Styles
   ============================================================ */

.ors-form-wrap {
    max-width: 640px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1e293b;
}

.ors-form-title {
    font-size: 1.6em;
    font-weight: 700;
    margin: 0 0 24px;
    color: #1e293b;
}

/* Alerts */
.ors-form-alerts {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}
.ors-form-alerts.ors-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.ors-form-alerts.ors-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #14532d;
}

/* Form layout */
.ors-form-row {
    margin-bottom: 18px;
}
.ors-form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 520px) {
    .ors-form-row-2 { grid-template-columns: 1fr; }
}

/* Field */
.ors-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ors-field label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.ors-req  { color: #ef4444; margin-left: 2px; }
.ors-opt  { font-weight: 400; color: #94a3b8; font-size: 12px; }

.ors-field input,
.ors-field select,
.ors-field textarea {
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: #1e293b;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    width: 100%;
    box-sizing: border-box;
}

.ors-field input:focus,
.ors-field select:focus,
.ors-field textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

.ors-field input.ors-invalid,
.ors-field select.ors-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,.1);
}

.ors-field-error {
    font-size: 12px;
    color: #ef4444;
    min-height: 16px;
    display: block;
}

/* Available slots grid */
.ors-slots-hint {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
    padding: 10px 0;
}

.ors-slots-loading {
    font-size: 13px;
    color: #64748b;
    padding: 10px 0;
}

.ors-slots-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}

.ors-slot-btn {
    padding: 8px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    background: #f8fafc;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}

.ors-slot-btn:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #1d4ed8;
}

.ors-slot-btn.ors-slot-selected {
    border-color: #16a34a;
    background: #dcfce7;
    color: #14532d;
}

.ors-no-slots {
    font-size: 13px;
    color: #ef4444;
    padding: 8px 0;
}

/* Submit button */
.ors-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    background: #1e293b;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s, transform .1s;
    width: 100%;
}
.ors-submit-btn:hover  { background: #334155; }
.ors-submit-btn:active { transform: scale(.99); }
.ors-submit-btn:disabled { opacity: .6; cursor: not-allowed; }

.ors-btn-secondary {
    background: transparent;
    color: #1e293b;
    border: 2px solid #1e293b;
    margin-top: 12px;
}
.ors-btn-secondary:hover { background: #f1f5f9; }

/* Disclaimer */
.ors-form-disclaimer {
    font-size: 12px;
    color: #94a3b8;
    margin: 12px 0 0;
    text-align: center;
}

/* Success state */
.ors-form-success {
    text-align: center;
    padding: 40px 20px;
}
.ors-success-icon { font-size: 52px; margin-bottom: 16px; }
.ors-form-success h3 { font-size: 1.3em; color: #14532d; margin: 0 0 12px; }
.ors-form-success p  { color: #475569; font-size: 15px; }

/* ---------------------------------------------------------------
   Modal variant (calendar click → form in overlay)
   --------------------------------------------------------------- */
.ors-modal .ors-form-wrap {
    max-width: 100%;
    margin: 0;
}
.ors-modal .ors-form-title {
    font-size: 1.2em;
    margin-bottom: 16px;
}
.ors-modal .ors-form-row-2 {
    grid-template-columns: 1fr 1fr;
}
.ors-modal .ors-modal-inner {
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Field hint text */
.ors-field-hint {
    font-size: 11px;
    color: #94a3b8;
    margin: 4px 0 0;
}
