/* Studio Profile V2 -- Sidebar Widgets
 *
 * Form-specific, badge, map placeholder, social container,
 * toast notification, and upgrade prompt styles.
 *
 * Base .sp-widget / .sp-widget__title / .sp-hours-today /
 * .sp-sidebar-phone live in layout.css.
 * Base .sp-badge / .sp-badge--open live in hero.css.
 * Base .sp-social-link live in profile.css.
 */

/* ── Inquiry Form ────────────────────────────────────────── */

.sp-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.sp-form__field {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.sp-form__label {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    font-weight: 500;
}

.sp-form__input,
.sp-form__select,
.sp-form__textarea {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    color: var(--color-text);
    font-family: var(--font-ui);
    transition: border-color var(--transition-normal);
    width: 100%;
}

.sp-form__input:focus,
.sp-form__select:focus,
.sp-form__textarea:focus {
    outline: none;
    border-color: var(--color-brand-accent);
}

.sp-form__select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-3) center;
    padding-right: calc(var(--space-3) + 20px);
    cursor: pointer;
}

.sp-form__textarea {
    resize: vertical;
    min-height: 80px;
}

.sp-form__honey {
    display: none;
}

.sp-form__submit {
    background: var(--color-brand-accent);
    color: #000;
    font-size: var(--text-sm);
    font-weight: 700;
    padding: var(--space-3);
    border-radius: var(--radius-md);
    width: 100%;
    border: none;
    cursor: pointer;
    transition: opacity var(--transition-normal);
}

.sp-form__submit:hover {
    opacity: 0.85;
}

.sp-form__submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sp-form__note {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-align: center;
}

/* Inline validation */
.sp-form__error {
    font-size: var(--text-xs);
    color: var(--color-error);
    margin-top: 2px;
}

.sp-form__input--error,
.sp-form__textarea--error {
    border-color: var(--color-error);
}

/* ── Badge: Closed ───────────────────────────────────────── */
/* .sp-badge--open is in hero.css; closed only appears in sidebar */

.sp-badge--closed {
    background: rgba(244, 67, 54, 0.15);
    color: var(--color-error);
    border: 1px solid rgba(244, 67, 54, 0.3);
    font-size: var(--text-xs);
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

/* ── Sidebar Mini Map ────────────────────────────────────── */

.sp-sidebar-map {
    height: var(--sp-sidebar-map-h);
    background: var(--color-surface);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sp-sidebar-map__placeholder {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-align: center;
}

/* ── Social Links Container (sidebar) ────────────────────── */
/* Individual .sp-social-link is styled in profile.css */

.sp-social-links {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

/* ── Toast Notification ──────────────────────────────────── */

.sp-toast {
    position: fixed;
    bottom: 80px;
    right: var(--space-4);
    max-width: 320px;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    z-index: var(--z-modal);
    animation: spToastIn 0.3s ease forwards;
}

/* Default toast (no type) -- dark semi-transparent */
.sp-toast:not(.sp-toast--success):not(.sp-toast--error) {
    background: var(--glass-bg);
    color: var(--color-text);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--color-border);
}

.sp-toast--success {
    background: rgba(76, 175, 80, 0.95);
    color: #fff;
}

.sp-toast--error {
    background: rgba(244, 67, 54, 0.95);
    color: #fff;
}

.sp-toast--hide {
    animation: spToastOut 0.3s ease forwards;
}

/* Legacy compatibility: .sp-toast--visible used by share/favorites */
.sp-toast--visible {
    opacity: 1;
}

@keyframes spToastIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes spToastOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* ── Upgrade Prompt (freemium limit) ─────────────────────── */

.sp-form-upgrade {
    text-align: center;
    padding: var(--space-6) var(--space-4);
}

.sp-form-upgrade__icon {
    font-size: 2rem;
    margin-bottom: var(--space-2);
}

.sp-form-upgrade__text {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-4);
}

.sp-form-upgrade__btn {
    display: inline-block;
    background: var(--color-brand-accent);
    color: #000;
    font-weight: 700;
    padding: var(--space-2) var(--space-6);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    text-decoration: none;
    transition: opacity var(--transition-normal);
}

.sp-form-upgrade__btn:hover {
    opacity: 0.85;
}
