/* ═══════════════════════════════════════════════════════
   Service Booking – Frontend Styles
   ═══════════════════════════════════════════════════════ */

.sb-form-wrapper {
    max-width: 780px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1a202c;
}

.sb-form-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
    padding: 36px 40px 40px;
}

@media (max-width: 600px) {
    .sb-form-container { padding: 24px 18px 28px; }
}

/* ─── Title ─────────────────────────────────────── */
.sb-form-title {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 24px;
    color: #1a1a2e;
}

/* ─── Labels / Hints ────────────────────────────── */
.sb-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #2d3748;
}

.sb-section-label {
    font-size: 16px;
    font-weight: 700;
    margin-top: 8px;
    margin-bottom: 2px;
    color: #1a1a2e;
}

.sb-hint {
    font-size: 12px;
    color: #a0aec0;
    margin: 4px 0 0;
}

/* ─── Services pills ────────────────────────────── */
.sb-services-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.sb-checkbox-pill {
    cursor: pointer;
    user-select: none;
}

.sb-checkbox-pill input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.sb-pill-text {
    display: inline-block;
    padding: 8px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
    background: #fff;
    transition: all .2s ease;
}

.sb-checkbox-pill:hover .sb-pill-text {
    border-color: #a0aec0;
}

.sb-checkbox-pill input:checked + .sb-pill-text {
    background: #2d3748;
    color: #fff;
    border-color: #2d3748;
}

.sb-checkbox-pill input:checked + .sb-pill-text::before {
    content: "✓ ";
    font-weight: 700;
}

/* ─── Rows / Columns ────────────────────────────── */
.sb-row {
    display: flex;
    gap: 20px;
    margin-bottom: 0;
}

.sb-col {
    flex: 1;
    min-width: 0;
}

@media (max-width: 600px) {
    .sb-row { flex-direction: column; gap: 0; }
}

/* ─── Inputs ────────────────────────────────────── */
.sb-field-group {
    margin-bottom: 20px;
}

.sb-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #2d3748;
    background: #f7f8fa;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
}

.sb-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,.15);
    background: #fff;
}

.sb-select {
    appearance: auto;
    cursor: pointer;
}

.sb-select:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.sb-slot-booked {
    color: #a0aec0 !important;
    background: #f7f8fa;
    font-style: italic;
}

.sb-textarea {
    resize: vertical;
    min-height: 70px;
}

/* ─── File upload ───────────────────────────────── */
.sb-file-wrapper {
    position: relative;
}

.sb-file-wrapper input[type="file"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f7f8fa;
    font-size: 14px;
    cursor: pointer;
}

/* Photo preview grid */
.sb-photo-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.sb-photo-preview img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

/* ─── Submit button ─────────────────────────────── */
.sb-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    padding: 13px 32px;
    background: #38a169;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    border: none;
    border-radius: 28px;
    cursor: pointer;
    transition: background .2s, transform .1s;
}

.sb-submit-btn:hover {
    background: #2f855a;
}

.sb-submit-btn:active {
    transform: scale(.98);
}

.sb-submit-btn:disabled {
    opacity: .7;
    cursor: not-allowed;
}

/* Spinner */
.sb-spinner {
    animation: sb-spin .8s linear infinite;
}
@keyframes sb-spin {
    to { transform: rotate(360deg); }
}

/* ─── Messages ──────────────────────────────────── */
.sb-message {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.sb-message--success {
    background: #f0fff4;
    border: 1px solid #c6f6d5;
    color: #276749;
}

.sb-message--error {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: #9b2c2c;
}

/* ─── Validation highlight ──────────────────────── */
.sb-input.sb-invalid {
    border-color: #fc8181;
    box-shadow: 0 0 0 3px rgba(252,129,129,.15);
}
