/* ── Stock Pro — Formulario Público de Reservas ─────────────── */

#sbp-root * { box-sizing: border-box; }

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

.sbp-title {
    font-size: 1.6em;
    font-weight: 700;
    margin-bottom: 28px;
    text-align: center;
    color: inherit;
}

/* ── Progress ────────────────────────────────────────────────── */
.sbp-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    gap: 0;
}

.sbp-step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    transition: all .25s;
    position: relative;
    z-index: 1;
}

.sbp-step-dot.active {
    background: #4F6CF7;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(79,108,247,.15);
}

.sbp-step-dot.done {
    background: #16a34a;
    color: #fff;
}

.sbp-step-line {
    flex: 1;
    height: 2px;
    background: #e5e7eb;
    max-width: 60px;
    transition: background .25s;
}

.sbp-step-line.done { background: #16a34a; }

/* ── Steps ───────────────────────────────────────────────────── */
.sbp-step { animation: sbp-in .2s ease; }

@keyframes sbp-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.sbp-step-title {
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 16px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: 11px;
}

/* ── Cards de selección ──────────────────────────────────────── */
.sbp-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.sbp-card {
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 14px;
    cursor: pointer;
    transition: all .15s;
    background: #fff;
    text-align: center;
}

.sbp-card:hover {
    border-color: #4F6CF7;
    background: #f5f7ff;
}

.sbp-card.selected {
    border-color: #4F6CF7;
    background: #eef1fe;
    box-shadow: 0 0 0 3px rgba(79,108,247,.12);
}

.sbp-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 20px;
}

.sbp-card-icon svg { display: block; }

.sbp-card-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 3px;
    color: #1a1d27;
}

.sbp-card-sub {
    font-size: 12px;
    color: #9ca3af;
}

/* ── Calendario ──────────────────────────────────────────────── */
.sbp-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.sbp-cal-title {
    font-weight: 600;
    font-size: 15px;
}

.sbp-cal-nav {
    background: none;
    border: 1.5px solid #e5e7eb;
    border-radius: 7px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #374151;
    font-size: 16px;
    transition: all .12s;
}
.sbp-cal-nav:hover { border-color: #4F6CF7; color: #4F6CF7; }

.sbp-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 20px;
}

.sbp-cal-dow {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    padding: 4px 0 8px;
    text-transform: uppercase;
}

.sbp-cal-day {
    aspect-ratio: 1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .12s;
    border: 1.5px solid transparent;
}

.sbp-cal-day:not(.empty):not(.disabled):hover {
    background: #f5f7ff;
    border-color: #4F6CF7;
    color: #4F6CF7;
}

.sbp-cal-day.selected {
    background: #4F6CF7;
    color: #fff;
    border-color: #4F6CF7;
}

.sbp-cal-day.today { font-weight: 700; }
.sbp-cal-day.disabled { color: #d1d5db; cursor: default; }
.sbp-cal-day.empty { cursor: default; }

/* ── Slots de horario ────────────────────────────────────────── */
.sbp-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.sbp-slot {
    padding: 8px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .12s;
    background: #fff;
    color: #374151;
}

.sbp-slot:hover {
    border-color: #4F6CF7;
    color: #4F6CF7;
    background: #f5f7ff;
}

.sbp-slot.selected {
    background: #4F6CF7;
    color: #fff;
    border-color: #4F6CF7;
}

.sbp-slots-empty {
    color: #9ca3af;
    font-size: 13px;
    padding: 12px 0;
}

/* ── Formulario datos del cliente ────────────────────────────── */
.sbp-field {
    margin-bottom: 16px;
}

.sbp-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #374151;
}

.sbp-label span { color: #ef4444; margin-left: 2px; }

.sbp-input,
.sbp-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #1a1d27;
    background: #fff;
    transition: border-color .15s;
    outline: none;
    font-family: inherit;
}

.sbp-input:focus,
.sbp-textarea:focus { border-color: #4F6CF7; }

.sbp-textarea {
    resize: vertical;
    min-height: 80px;
}

/* ── Upload de imágenes ──────────────────────────────────────── */
.sbp-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all .15s;
    background: #f9fafb;
    color: #6b7280;
    font-size: 13px;
}

.sbp-upload-area:hover,
.sbp-upload-area.drag-over {
    border-color: #4F6CF7;
    background: #f5f7ff;
    color: #4F6CF7;
}

.sbp-upload-area svg { margin-bottom: 8px; display: block; margin-left: auto; margin-right: auto; }

.sbp-upload-input { display: none; }

.sbp-images-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.sbp-img-thumb {
    position: relative;
    width: 80px;
    height: 80px;
}

.sbp-img-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 1.5px solid #e5e7eb;
}

.sbp-img-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sbp-img-uploading {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.75);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

/* ── Confirmación ────────────────────────────────────────────── */
.sbp-confirm-box {
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.sbp-confirm-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
}

.sbp-confirm-row:last-child { border-bottom: none; }

.sbp-confirm-label { color: #6b7280; }
.sbp-confirm-value { font-weight: 600; color: #1a1d27; }

.sbp-success-box {
    text-align: center;
    padding: 40px 20px;
}

.sbp-success-icon {
    width: 64px;
    height: 64px;
    background: #dcfce7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #16a34a;
}

.sbp-success-title {
    font-size: 1.3em;
    font-weight: 700;
    color: #16a34a;
    margin-bottom: 8px;
}

.sbp-success-sub {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

/* ── Botones ─────────────────────────────────────────────────── */
.sbp-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.sbp-btn {
    padding: 11px 22px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .15s;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: inherit;
}

.sbp-btn-primary {
    background: #4F6CF7;
    color: #fff;
}

.sbp-btn-primary:hover:not(:disabled) { background: #3b57e0; }
.sbp-btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.sbp-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.sbp-btn-secondary:hover { background: #e5e7eb; }

/* ── Mensajes ────────────────────────────────────────────────── */
.sbp-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    padding: 12px 16px;
    font-size: 13px;
    margin-top: 12px;
}

.sbp-loading {
    text-align: center;
    color: #9ca3af;
    padding: 32px;
    font-size: 14px;
}

/* ── Dark mode ───────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
    .sbp-wrap { color: #e2e4e9; }
    .sbp-card { background: #1e2130; border-color: #2d3148; }
    .sbp-card:hover { background: #252840; }
    .sbp-card.selected { background: #1e2550; }
    .sbp-card-name { color: #e2e4e9; }
    .sbp-input, .sbp-textarea { background: #1e2130; border-color: #2d3148; color: #e2e4e9; }
    .sbp-confirm-box { background: #1e2130; border-color: #2d3148; }
    .sbp-confirm-row { border-color: #2d3148; }
    .sbp-confirm-value { color: #e2e4e9; }
    .sbp-upload-area { background: #1e2130; border-color: #2d3148; color: #9ca3af; }
    .sbp-slot { background: #1e2130; border-color: #2d3148; color: #c9cdd7; }
    .sbp-cal-day { color: #c9cdd7; }
    .sbp-cal-day.disabled { color: #3d4160; }
    .sbp-step-dot { background: #2d3148; color: #6b7280; }
    .sbp-step-line { background: #2d3148; }
    .sbp-btn-secondary { background: #2d3148; color: #c9cdd7; }
    .sbp-btn-secondary:hover { background: #363c5a; }
}
