/* ================================================
   Padel Royal – Royal Theme
   Primary  : #0B3D2E (Royal Green)
   Accent   : #C9A227 (Royal Gold)
   BG       : #F6F8F5 (Light)
================================================ */

/* ── Root Variables ── */
:root {
    --pr-navy:       #0B3D2E;
    --pr-navy-dark:  #072A20;
    --pr-navy-light: #145240;
    --pr-gold:       #C9A227;
    --pr-gold-light: #E3C86B;
    --pr-gold-dark:  #A8841F;
    --pr-bg:         #F6F8F5;
    --pr-text:       #1F2A26;
}

/* ── Base ── */
body {
    background-color: var(--pr-bg);
    color: var(--pr-text);
    font-family: 'Cairo', sans-serif;
}

/* ══════════════════════════════
   NAVBAR
══════════════════════════════ */
.navbar {
    background-color: var(--pr-navy) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.82) !important;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.45rem 1rem !important;
    transition: all 0.25s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--pr-gold) !important;
    background-color: rgba(255, 255, 255, 0.07);
}

/* ── Login Button ── */
.btn-login {
    background: linear-gradient(135deg, var(--pr-gold), var(--pr-gold-dark));
    color: #fff !important;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    padding: 0.4rem 1.3rem !important;
    transition: filter 0.2s, transform 0.2s;
}

.btn-login:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
}

/* ── Language Switcher ── */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(201, 162, 39, 0.45);
    border-radius: 50px;
    padding: 2px;
}

.lang-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    color: var(--pr-gold);
}

.lang-btn.active {
    background: linear-gradient(135deg, var(--pr-gold), var(--pr-gold-dark));
    color: #fff;
}

/* ══════════════════════════════
   BUTTONS (Primary)
══════════════════════════════ */
.btn-primary,
.btn-book {
    background-color: var(--pr-navy) !important;
    border-color: var(--pr-navy) !important;
    color: #fff !important;
    font-weight: 700;
    border-radius: 9px;
    transition: background 0.25s, transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover,
.btn-book:hover {
    background-color: var(--pr-gold) !important;
    border-color: var(--pr-gold-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(201, 162, 39, 0.35);
}

/* ── Gold Outline Button ── */
.btn-gold {
    background: transparent;
    border: 2px solid var(--pr-gold);
    color: var(--pr-gold);
    font-weight: 700;
    border-radius: 9px;
    transition: all 0.25s;
}

.btn-gold:hover {
    background: var(--pr-gold);
    color: #fff;
}

/* ── Filter Buttons ── */
.filter-btn.active,
.filter-btn:hover {
    background-color: var(--pr-navy) !important;
    color: #fff !important;
    border-color: var(--pr-navy) !important;
}

/* ══════════════════════════════
   BADGES
══════════════════════════════ */
.badge-category,
.badge-gold {
    background: linear-gradient(135deg, var(--pr-gold), var(--pr-gold-dark));
    color: #fff;
}

.badge-navy {
    background-color: var(--pr-navy);
    color: #fff;
}

/* ══════════════════════════════
   CARDS
══════════════════════════════ */
.card {
    border: none;
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(26, 42, 58, 0.14) !important;
}

.card-img-top {
    height: 220px;
    object-fit: cover;
}

/* ── Court Banners ── */
.court-banner {
    height: 165px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.indoor-banner  { background: linear-gradient(135deg, #1a3a5c, #2e6da4); }
.outdoor-banner { background: linear-gradient(135deg, #0B3D2E, #145240); }

/* ── Price Box ── */
.price-box {
    background-color: #eef2f7;
    border-radius: 10px;
    padding: 0.5rem 1rem;
}

/* ══════════════════════════════
   PAGE HEADER
══════════════════════════════ */
.page-header {
    background: linear-gradient(135deg, var(--pr-navy), var(--pr-navy-light));
    color: #fff;
    padding: 2.5rem 0;
    margin-bottom: 2rem;
}

.page-header h2 { font-weight: 900; }
.page-header p  { color: rgba(255,255,255,0.72); }

/* ══════════════════════════════
   FOOTER
══════════════════════════════ */
footer {
    background-color: var(--pr-navy);
    color: rgba(255, 255, 255, 0.70);
    padding: 2rem 0;
}

footer .footer-brand { color: var(--pr-gold); font-weight: 800; font-size: 1.2rem; }
footer a { color: var(--pr-gold); text-decoration: none; transition: opacity 0.2s; }
footer a:hover { opacity: 0.8; text-decoration: underline; }
footer hr { border-color: rgba(255,255,255,0.12); }

/* ══════════════════════════════
   SCROLLBAR (optional, webkit)
══════════════════════════════ */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--pr-bg); }
::-webkit-scrollbar-thumb { background: var(--pr-gold); border-radius: 10px; }

/* ══════════════════════════════
   UTILITIES
══════════════════════════════ */
.text-gold   { color: var(--pr-gold) !important; }
.text-navy   { color: var(--pr-navy) !important; }
.bg-navy     { background-color: var(--pr-navy) !important; }
.bg-gold     { background-color: var(--pr-gold) !important; }
.rounded-xl  { border-radius: 14px !important; }

/* ══════════════════════════════
   PROMO BANNERS + MEDIA PLACEHOLDERS
══════════════════════════════ */
.ad-banner {
    border-radius: 18px;
    padding: 1.35rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    border: 1px solid rgba(201, 162, 39, 0.32);
    background: linear-gradient(120deg, rgba(11, 61, 46, 0.96), rgba(20, 82, 64, 0.96));
    box-shadow: 0 10px 26px rgba(7, 42, 32, 0.2);
}

.ad-banner-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0;
}

.ad-banner-subtitle {
    color: rgba(255, 255, 255, 0.78);
    margin: 0;
}

.ad-banner-chip {
    background: rgba(201, 162, 39, 0.15);
    color: var(--pr-gold);
    border: 1px solid rgba(201, 162, 39, 0.45);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3rem 0.75rem;
}

.media-placeholder {
    border-radius: 16px;
    min-height: 220px;
    position: relative;
    overflow: hidden;
    border: 1px dashed rgba(201, 162, 39, 0.5);
    background: linear-gradient(150deg, rgba(11, 61, 46, 0.97), rgba(7, 42, 32, 0.95));
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

.media-placeholder::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at 20% 20%, rgba(201, 162, 39, 0.18), transparent 35%),
      radial-gradient(circle at 80% 75%, rgba(201, 162, 39, 0.12), transparent 35%);
}

.media-placeholder-label {
    position: relative;
    z-index: 1;
    color: #fff;
    margin: 0;
    font-weight: 700;
    font-size: 0.9rem;
}

/* ══════════════════════════════
   MANAGEMENT DASHBOARD
══════════════════════════════ */
.admin-shell {
    background: linear-gradient(160deg, rgba(11, 61, 46, 0.06), rgba(201, 162, 39, 0.08));
    border: 1px solid rgba(201, 162, 39, 0.28);
    border-radius: 18px;
    padding: 1.2rem;
}

.admin-stat-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(11, 61, 46, 0.1);
    box-shadow: 0 6px 20px rgba(7, 42, 32, 0.08);
    padding: 1rem;
    height: 100%;
}

.admin-stat-title {
    color: #5f6a66;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}

.admin-stat-value {
    color: var(--pr-navy);
    font-size: 1.65rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 0;
}

.admin-panel {
    border-radius: 16px;
    border: 1px solid rgba(11, 61, 46, 0.12);
}

/* ================================================
   Smart Support – Floating Collapsible Chat
================================================ */
.chat-fab-wrap {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    pointer-events: none; /* children re-enable */
}

/* Floating Action Button (FAB) */
.chat-fab {
    pointer-events: auto;
    align-self: flex-start;
    width: 62px;
    height: 62px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: linear-gradient(135deg, #0d3b2e, #145240);
    color: #D4AF37;
    font-size: 1.55rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 28px rgba(13, 59, 46, 0.42);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.chat-fab:hover {
    transform: translateY(-3px) scale(1.06);
    box-shadow: 0 16px 34px rgba(13, 59, 46, 0.52);
}
.chat-fab:focus-visible {
    outline: 3px solid rgba(212, 175, 55, 0.65);
    outline-offset: 3px;
}

/* Icon swap (chat icon <-> close icon) */
.chat-fab .chat-fab-icon-close { display: none; }
.chat-fab-wrap.open .chat-fab {
    background: linear-gradient(135deg, #D4AF37, #b8932c);
    color: #0d3b2e;
}
.chat-fab-wrap.open .chat-fab .chat-fab-icon-open  { display: none; }
.chat-fab-wrap.open .chat-fab .chat-fab-icon-close { display: inline-block; }

/* Chat box – hidden by default, animates in when open */
.chatbot-widget {
    width: 320px;
    max-width: calc(100vw - 48px);
    border: 1px solid rgba(13, 59, 46, 0.18);
    border-radius: 16px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px) scale(0.96);
    transform-origin: bottom left;
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0s linear 0.28s;
}
.chat-fab-wrap.open .chatbot-widget {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0s;
}

.chatbot-header {
    background: linear-gradient(135deg, #0d3b2e, #145240);
    color: #fff;
    font-weight: 700;
    border-bottom: 2px solid rgba(212, 175, 55, 0.55);
}
.chatbot-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    padding: 2px 7px;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
}
.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #D4AF37;
}

.chatbot-bubble {
    background: #F6F8F5;
    border: 1px solid #dde4df;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.88rem;
}

/* Mobile tuning – keep the FAB compact, never block the screen */
@media (max-width: 575.98px) {
    .chat-fab-wrap { left: 16px; bottom: 16px; gap: 12px; }
    .chat-fab { width: 54px; height: 54px; font-size: 1.35rem; }
    .chatbot-widget { width: calc(100vw - 32px); }
}

.pr-messages {
    display: grid;
    gap: 10px;
}

.pr-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 12px;
    font-weight: 700;
    border: 1px solid transparent;
    box-shadow: 0 8px 20px rgba(7, 42, 32, 0.08);
}

.pr-alert-success {
    background: #edf9f1;
    color: #0d5f35;
    border-color: #bce8c9;
}

.pr-alert-error {
    background: #fff1f1;
    color: #a02121;
    border-color: #f2c3c3;
}

.pr-alert-info {
    background: #eef5ff;
    color: #1f4f82;
    border-color: #c4daf4;
}