/* ═══════════════════════════════════════════════════════════════
   BOOKINGS.REST — SATELLITE PLUGINS OVERRIDE
   Forces the new design system over hardcoded inline styles
   Load AFTER backoffice.css
   ═══════════════════════════════════════════════════════════════ */

/* ─── GLOBAL: Force font on all elements ─── */
.bookings-backoffice,
.bookings-backoffice *,
.bookings-backoffice input,
.bookings-backoffice select,
.bookings-backoffice textarea,
.bookings-backoffice button {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* ─── GLOBAL: Neutralize old primary color references ─── */
.bookings-backoffice [style*="background:#0f4c81"],
.bookings-backoffice [style*="background: #0f4c81"],
.bookings-backoffice [style*="background:var(--primary-hover)"] {
    background: var(--bg-surface) !important;
    color: var(--text-muted) !important;
}

/* ─── GLOBAL: Force table headers to new style ─── */
.bookings-table th {
    background: var(--bg-surface) !important;
    color: var(--text-muted) !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    border-bottom: 1px solid var(--border) !important;
}

/* ─── GLOBAL: Force select/input styles over inline ─── */
.bookings-backoffice select[style],
.bookings-backoffice input[style]:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: var(--text-main) !important;
    background: var(--bg-surface) !important;
    padding: 6px 10px !important;
    height: 34px !important;
}
.bookings-backoffice textarea[style] {
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    color: var(--text-main) !important;
    background: var(--bg-surface) !important;
    padding: 8px 10px !important;
}
.bookings-backoffice select[style]:focus,
.bookings-backoffice input[style]:focus,
.bookings-backoffice textarea[style]:focus {
    border-color: var(--primary) !important;
    outline: none !important;
    box-shadow: none !important;
}

/* ─── GLOBAL: Force label styles ─── */
.bookings-backoffice label[style*="font-weight:600"],
.bookings-backoffice label[style*="font-weight: 600"] {
    font-weight: 500 !important;
    font-size: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    color: var(--text-muted) !important;
}

/* ═══ ABANDONED ═══ */

/* Dashboard widget: use amber instead of red */
#bra-dashboard-widget {
    background: rgba(245,158,11,0.06) !important;
    border: 1px solid rgba(245,158,11,0.15) !important;
    text-decoration: none !important;
}
#bra-dashboard-widget h3 {
    color: #92400e !important;
    font-size: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
}
#bra-dashboard-widget .value,
#bra-stat-today {
    color: var(--amber-text) !important;
    font-size: 28px !important;
    font-weight: 300 !important;
}

/* Period buttons */
.abn-period-btn {
    padding: 6px 12px !important;
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    background: var(--bg-surface) !important;
    color: var(--text-secondary) !important;
    font-family: inherit !important;
    transition: all 0.12s !important;
    height: 30px !important;
}
.abn-period-btn:hover {
    background: var(--bg-base) !important;
    color: var(--text-main) !important;
}
.abn-period-btn.active {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
}

/* Stats cards in abandoned */
#view-abandoned [style*="background:#f1f5f9"],
#view-abandoned [style*="background: #f1f5f9"] {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 10px !important;
}
#view-abandoned [style*="background:#fef3c7"],
#view-abandoned [style*="background: #fef3c7"] {
    background: var(--yellow-bg) !important;
    border: 1px solid rgba(245,158,11,0.15) !important;
    border-radius: 10px !important;
}
#view-abandoned [style*="background:#fee2e2"],
#view-abandoned [style*="background: #fee2e2"] {
    background: var(--red-bg) !important;
    border: 1px solid rgba(239,68,68,0.12) !important;
    border-radius: 10px !important;
}
#view-abandoned [style*="background:#ecfdf5"],
#view-abandoned [style*="background: #ecfdf5"] {
    background: var(--green-bg) !important;
    border: 1px solid rgba(16,185,129,0.15) !important;
    border-radius: 10px !important;
}

/* Stat numbers in abandoned */
#view-abandoned [style*="font-size:24px"][style*="font-weight:700"] {
    font-size: 22px !important;
    font-weight: 300 !important;
}

/* ═══ ANALYTICS ═══ */

/* Tabs: force new underline style */
.bookings-tabs .bookings-tab {
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 10px 16px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: var(--text-muted) !important;
}
.bookings-tabs .bookings-tab:hover {
    background: transparent !important;
    color: var(--text-secondary) !important;
}
.bookings-tabs .bookings-tab.active {
    background: transparent !important;
    color: var(--primary) !important;
    border-bottom-color: var(--primary) !important;
    box-shadow: none !important;
}

/* Analytics table total row */
#view-analytics tr[style*="border-top:3px solid"] {
    border-top: 2px solid var(--primary) !important;
}
#view-analytics td[style*="background:var(--primary);color:#fff"],
#view-analytics td[style*="background:#0c3d69"] {
    background: var(--primary) !important;
    color: #fff !important;
    border-radius: 0 !important;
}
#view-analytics td[style*="background:var(--primary-light)"] {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
}

/* Card-style stat blocks in analytics JS output */
#view-analytics [style*="border:1px solid var(--border);border-radius:10px"] {
    border: 1px solid var(--border) !important;
    border-radius: 10px !important;
    background: var(--bg-surface) !important;
}
#view-analytics [style*="font-size:26px;font-weight:700"] {
    font-size: 24px !important;
    font-weight: 300 !important;
}
#view-analytics [style*="font-size:11px;color:var(--text-muted);text-transform:uppercase"] {
    font-size: 10px !important;
    font-weight: 500 !important;
    letter-spacing: 0.8px !important;
}

/* Analytics topbar month selector */
#analytics-month-label {
    font-weight: 500 !important;
    font-size: 14px !important;
}

/* ═══ EXPERIENCES ═══ */

/* Experience table badges */
#view-experiences .bookings-badge {
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    padding: 2px 8px !important;
}

/* Experience edit form */
#view-experience-edit .bookings-field label {
    font-weight: 500 !important;
    font-size: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    color: var(--text-muted) !important;
}
#view-experience-edit .bookings-field input,
#view-experience-edit .bookings-field select,
#view-experience-edit .bookings-field textarea {
    height: 38px !important;
    font-size: 13px !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
}
#view-experience-edit .bookings-field textarea {
    height: auto !important;
    min-height: 70px !important;
}

/* Day checkboxes in experiences */
#view-experience-edit .exp-day {
    width: auto !important;
}
#view-experience-edit label[style*="font-size:13px;display:flex"] {
    font-size: 12px !important;
    padding: 4px 8px !important;
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    cursor: pointer !important;
}

/* Menu upload cards */
.exp-menu-card {
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    padding: 14px 16px !important;
}

/* ═══ REVIEWS ═══ */

/* Reviews tabs */
.brr-tab {
    padding: 10px 16px !important;
    border: none !important;
    background: transparent !important;
    cursor: pointer !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: var(--text-muted) !important;
    border-bottom: 2px solid transparent !important;
    margin-bottom: -2px !important;
    transition: all 0.12s !important;
}
.brr-tab:hover {
    color: var(--text-secondary) !important;
}
.brr-tab-active, .brr-tab.brr-tab-active {
    color: var(--primary) !important;
    border-bottom-color: var(--primary) !important;
    font-weight: 500 !important;
}

/* Reviews tab container */
[style*="display:flex;gap:0;margin-bottom:0;border-bottom:2px solid #e5e7eb"] {
    border-bottom: 1px solid var(--border) !important;
}

/* Platform rows */
.brr-platform-row {
    padding: 10px 0 !important;
    border-bottom: 1px solid rgba(0,0,0,0.04) !important;
}
.brr-platform-row label[style] {
    min-width: 180px !important;
}
.brr-platform-row span[style*="font-weight:600;font-size:14px"] {
    font-size: 12px !important;
    font-weight: 500 !important;
}
.brr-platform-row input[type="url"],
.brr-platform-row input[type="text"].brr-plat-url {
    font-family: var(--mono) !important;
    font-size: 11px !important;
}

/* Review log table */
.brr-log-table,
#brr-tab-log table {
    width: 100% !important;
    border-collapse: collapse !important;
}
#brr-tab-log th {
    background: var(--bg-surface) !important;
    color: var(--text-muted) !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    padding: 12px 14px !important;
    border-bottom: 1px solid var(--border) !important;
}
#brr-tab-log td {
    font-size: 13px !important;
    padding: 10px 14px !important;
    border-bottom: 1px solid rgba(0,0,0,0.04) !important;
}

/* Reviews saved confirmation */
#brr-config-saved,
[style*="color:#059669;font-weight:600"] {
    color: var(--green-text) !important;
    font-weight: 500 !important;
    font-size: 12px !important;
}

/* Review request button in reservation actions */
.btn-review-request {
    border-color: var(--border) !important;
    color: var(--text-muted) !important;
}
.btn-review-request:hover {
    border-color: rgba(245,158,11,0.4) !important;
    color: var(--amber-text) !important;
    background: rgba(245,158,11,0.06) !important;
}
.btn-review-request.brr-sent {
    color: var(--amber) !important;
    border-color: rgba(245,158,11,0.3) !important;
}

/* ═══ GLOBAL: Old color cleanup ═══ */

/* Force old blue references to new indigo */
.bookings-backoffice [style*="#2563eb"] { color: var(--primary) !important; }
.bookings-backoffice [style*="#0f4c81"] { color: var(--primary) !important; }
.bookings-backoffice [style*="background:#2563eb"] { background: var(--primary) !important; }

/* Force Inter-compatible font sizes (old was Space Grotesk which is wider) */
.bookings-backoffice h3[style*="font-size:18px"] { font-size: 14px !important; font-weight: 500 !important; }
.bookings-backoffice h3[style*="font-size:16px"] { font-size: 13px !important; font-weight: 500 !important; }
.bookings-backoffice [style*="font-size:32px"] { font-size: 28px !important; font-weight: 300 !important; }
.bookings-backoffice [style*="font-size:24px"][style*="font-weight:700"] { font-size: 22px !important; font-weight: 300 !important; }
.bookings-backoffice [style*="font-size:20px"][style*="font-weight:800"] { font-size: 18px !important; font-weight: 300 !important; }

/* Shadow cleanup */
.bookings-backoffice [style*="box-shadow"] { box-shadow: none !important; }

/* ─── GLOBAL: Force minimum tag size on any remaining inline badges ─── */
.bookings-backoffice span[style*="border-radius:4px"][style*="font-size:11px"],
.bookings-backoffice span[style*="border-radius:4px"][style*="font-size:10px"],
.bookings-backoffice span[style*="border-radius:3px"][style*="font-size:9px"] {
    font-size: 11px !important;
    padding: 2px 8px !important;
    border-radius: 5px !important;
    font-weight: 600 !important;
}
