/**
 * BookingPlaner — Public Page CSS
 *
 * Minimal, clean, embeddable design for the public availability widget.
 * Self-contained -- does not depend on app.css.
 */

/* ─── Custom Properties ──────────────────────────────────────── */
:root {
    --bp-primary: #1e3a5f;
    --bp-primary-light: #2d5a8e;
    --bp-accent: #f59e0b;
    --bp-success: #10b981;
    --bp-success-light: #d1fae5;
    --bp-danger: #ef4444;
    --bp-danger-light: #fee2e2;
    --bp-text: #1e293b;
    --bp-text-muted: #64748b;
    --bp-border: #e2e8f0;
    --bp-bg: #f8fafc;
    --bp-bg-white: #ffffff;
    --bp-radius-md: 8px;
    --bp-radius-lg: 12px;
    --bp-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --bp-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.bp-public {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--bp-text);
    background: var(--bp-bg);
}

a { color: var(--bp-primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Container ──────────────────────────────────────────────── */
.bp-public__container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ─── Header ─────────────────────────────────────────────────── */
.bp-public__header {
    text-align: center;
    margin-bottom: 2rem;
}

.bp-public__title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--bp-primary);
}

.bp-public__subtitle {
    font-size: 1rem;
    color: var(--bp-text-muted);
    margin-top: 0.25rem;
}

/* ─── Flash Messages ─────────────────────────────────────────── */
.bp-flash {
    padding: 0.75rem 1rem;
    border-radius: var(--bp-radius-md);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.bp-flash--success { background: var(--bp-success-light); color: #065f46; border: 1px solid var(--bp-success); }
.bp-flash--error { background: var(--bp-danger-light); color: #991b1b; border: 1px solid var(--bp-danger); }

/* ─── Properties ─────────────────────────────────────────────── */
.bp-public__properties {
    margin-bottom: 2rem;
}

.bp-public__properties h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.bp-public__property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.bp-public__property-card {
    background: var(--bp-bg-white);
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-lg);
    overflow: hidden;
    box-shadow: var(--bp-shadow-sm);
}

.bp-public__property-color { height: 4px; }

.bp-public__property-card h3 {
    padding: 1rem 1rem 0.25rem;
    font-size: 1rem;
}

.bp-public__property-card p {
    padding: 0 1rem;
    font-size: 0.8125rem;
    color: var(--bp-text-muted);
}

.bp-public__property-meta {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    color: var(--bp-text-muted);
    border-top: 1px solid var(--bp-border);
    margin-top: 0.5rem;
}

/* ─── Calendar ───────────────────────────────────────────────── */
.bp-public__calendar {
    margin-bottom: 2rem;
}

.bp-public__calendar h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.bp-calendar__controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.bp-calendar__month-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.bp-calendar__wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--bp-bg-white);
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-lg);
}

.bp-calendar--public {
    min-width: 700px;
}

.bp-calendar__loading {
    padding: 2rem;
    text-align: center;
    color: var(--bp-text-muted);
}

/* ─── Inquiry Form ───────────────────────────────────────────── */
.bp-public__inquiry {
    background: var(--bp-bg-white);
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--bp-shadow-sm);
    margin-bottom: 2rem;
}

.bp-public__inquiry h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* ─── Form Components ────────────────────────────────────────── */
.bp-form__group { margin-bottom: 1rem; }

.bp-form__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.bp-form__input,
.bp-form__select,
.bp-form__textarea {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--bp-text);
    background: var(--bp-bg-white);
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius-md);
    appearance: none;
}

.bp-form__input:focus,
.bp-form__select:focus,
.bp-form__textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.bp-form__select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.bp-form__textarea { resize: vertical; min-height: 80px; }
.bp-form__input--small { max-width: 120px; }

.bp-form__row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.bp-form__group--half { flex: 1; min-width: 200px; }
.bp-form__group--quarter { flex: 1; min-width: 120px; }

.bp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: var(--bp-radius-md);
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
}

.bp-btn--primary {
    background: var(--bp-primary);
    color: white;
}

.bp-btn--primary:hover { background: var(--bp-primary-light); }

.bp-btn--ghost {
    background: transparent;
    color: var(--bp-text-muted);
    border-color: var(--bp-border);
}

.bp-btn--ghost:hover { background: var(--bp-border); }

.bp-btn--sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }

/* ─── Contact ────────────────────────────────────────────────── */
.bp-public__contact {
    margin-bottom: 2rem;
}

.bp-public__contact h2 { font-size: 1.25rem; margin-bottom: 0.75rem; }

/* ─── Footer ─────────────────────────────────────────────────── */
.bp-public__footer {
    text-align: center;
    font-size: 0.75rem;
    color: var(--bp-text-muted);
    padding-top: 1rem;
    border-top: 1px solid var(--bp-border);
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .bp-public__container { padding: 1rem 0.75rem; }

    .bp-form__row { flex-direction: column; }

    .bp-form__group--half,
    .bp-form__group--quarter {
        min-width: 100%;
    }

    .bp-public__property-grid {
        grid-template-columns: 1fr;
    }
}
