/* ================================================================
 * FantaVolley — Orange Energy
 * Identita di sezione ispirata alla maglia e al pallone della mascotte.
 * Il file e caricato dal layout condiviso e copre pagine pubbliche e admin.
 * ================================================================ */

body.fv-theme-orange {
  --fv-bg: #fff4e8;
  --fv-bg-soft: #ffead5;
  --fv-card: #fffdf9;
  --fv-card-2: #fff7ef;
  --fv-surface: rgba(255, 253, 249, .94);
  --fv-surface-solid: #fffdf9;
  --fv-surface-2: #fff7ef;
  --fv-text: #26211e;
  --fv-muted: #76665d;
  --fv-border: rgba(125, 61, 21, .12);
  --fv-shadow: 0 12px 34px rgba(111, 55, 20, .09);
  --fv-shadow-hover: 0 20px 46px rgba(111, 55, 20, .15);
  --fv-shadow-lg: 0 22px 52px rgba(77, 36, 15, .16);
  --fv-primary: #ea580c;
  --fv-primary-dark: #c2410c;
  --fv-primary-2: #f97316;
  --fv-primary-3: #fb923c;
  --fv-secondary: #fb923c;
  --fv-secondary-dark: #ea580c;
  --fv-volley: #f97316;
  --fv-volley-dark: #c2410c;
  --fv-orange: #f97316;
  --fv-info: #f97316;
  --fv-warning: #f59e0b;
  --fv-success: #3f7d4b;
  --fv-success-dark: #315f3a;
  --fv-danger: #dc3f3f;
  --fv-dark: #292524;
  --fv-cream: #fff8f1;
  --fv-chat-self: #ffead8;
  --fv-chat-other: #fffdf9;
  --fv-chat-separator: #ffe4cc;
  color: var(--fv-text);
  background:
    radial-gradient(circle at 5% 2%, rgba(251, 146, 60, .17), transparent 25rem),
    radial-gradient(circle at 96% 8%, rgba(245, 158, 11, .10), transparent 23rem),
    linear-gradient(180deg, #fffaf5 0%, #fff2e5 52%, #ffead7 100%);
  background-attachment: fixed;
}

body.fv-theme-orange::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .26;
  background-image: radial-gradient(rgba(194, 65, 12, .18) .65px, transparent .65px);
  background-size: 16px 16px;
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
}

/* Navigation */
body.fv-theme-orange .fv-navbar {
  background: rgba(255, 253, 249, .92) !important;
  border-bottom: 1px solid rgba(234, 88, 12, .14);
  box-shadow: 0 10px 34px rgba(99, 46, 18, .09);
}

body.fv-theme-orange .fv-brand-logo,
body.fv-theme-orange .fv-home-link,
body.fv-theme-orange .fv-user-toggle,
body.fv-theme-orange .fv-navbar .navbar-toggler {
  background: #fff7ef;
  border-color: rgba(234, 88, 12, .14);
  box-shadow: 0 8px 20px rgba(155, 69, 20, .10);
}

body.fv-theme-orange .fv-brand-logo {
  padding: 0;
  object-fit: cover;
  object-position: 50% 15%;
  border: 2px solid rgba(234, 88, 12, .28);
  border-radius: 13px;
}

body.fv-theme-orange .fv-navbar .navbar-brand {
  color: #292524 !important;
  letter-spacing: .035em;
}

body.fv-theme-orange .fv-navbar .nav-link:hover,
body.fv-theme-orange .fv-navbar .nav-link:focus,
body.fv-theme-orange .fv-user-toggle:hover,
body.fv-theme-orange .fv-user-toggle:focus {
  color: #c2410c !important;
  background: #fff0e2 !important;
}

body.fv-theme-orange .fv-navbar .nav-link.active,
body.fv-theme-orange .fv-navbar .dropdown-toggle.active {
  color: #c2410c !important;
  background: linear-gradient(135deg, #ffead5, #fff4e9);
  box-shadow: inset 0 0 0 1px rgba(234, 88, 12, .14);
}

body.fv-theme-orange .fv-navbar .dropdown-menu {
  background: rgba(255, 253, 249, .98);
  border-color: rgba(234, 88, 12, .12);
  box-shadow: 0 20px 48px rgba(74, 34, 14, .15);
}

body.fv-theme-orange .fv-navbar .dropdown-item:hover,
body.fv-theme-orange .fv-navbar .dropdown-item:focus {
  color: #c2410c;
  background: #fff0e2;
}

body.fv-theme-orange .fv-season-badge {
  color: #fff;
  background: linear-gradient(135deg, #c2410c 0%, #f97316 65%, #fb923c 100%);
  box-shadow: 0 10px 24px rgba(234, 88, 12, .25);
}

/* Hero: una firma coerente per tutte le pagine principali */
body.fv-theme-orange :is(.fv-header-hero, .fv-rank-hero, .fv-hero-box, .fv-hero) {
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, .18);
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, .16), transparent 18rem),
    linear-gradient(128deg, #9a3412 0%, #ea580c 42%, #f97316 72%, #fb923c 100%);
  color: #fff;
  box-shadow: 0 22px 48px rgba(154, 52, 18, .25);
}

body.fv-theme-orange :is(.fv-header-hero, .fv-rank-hero, .fv-hero-box, .fv-hero)::before,
body.fv-theme-orange :is(.fv-header-hero, .fv-rank-hero, .fv-hero-box, .fv-hero)::after {
  background: rgba(255, 255, 255, .09);
}

body.fv-theme-orange :is(.fv-hero-kicker, .fv-rank-kicker, .fv-season-pill) {
  color: #fffaf5;
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .22);
  backdrop-filter: blur(8px);
}

body.fv-theme-orange :is(.fv-hero-subtitle, .fv-rank-subtitle) {
  color: rgba(255, 255, 255, .86);
}

/* Titolo compatto per pagine nate senza hero (Leghe, Coppa e admin) */
body.fv-theme-orange .fv-simple-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(125deg, #9a3412, #ea580c 52%, #fb923c);
  box-shadow: 0 18px 38px rgba(154, 52, 18, .20);
}

body.fv-theme-orange .fv-simple-hero h1,
body.fv-theme-orange .fv-simple-hero h2 {
  margin: 0;
  font-weight: 900;
  font-size: clamp(1.35rem, 2.3vw, 2rem);
  letter-spacing: -.02em;
}

body.fv-theme-orange .fv-simple-hero .badge {
  color: #fff !important;
  background: rgba(255, 255, 255, .16) !important;
  border: 1px solid rgba(255, 255, 255, .22);
  padding: .55rem .8rem;
}

/* Superfici e contenitori */
body.fv-theme-orange :is(
  .card, .fv-card, .fv-panel, .fv-toolbar-card, .fv-table-card,
  .fv-chart-card, .fv-filter-card, .fv-note-card, .fv-empty-card,
  .fv-result-card, .fv-admin-panel
) {
  border-color: rgba(155, 69, 20, .12);
  background-color: rgba(255, 253, 249, .96);
  box-shadow: 0 12px 34px rgba(111, 55, 20, .09);
}

body.fv-theme-orange :is(.card, .fv-card, .fv-panel, .fv-result-card) {
  border-radius: 20px;
}

body.fv-theme-orange :is(.card-header, .card-footer, .fv-table-header, .fv-panel-header) {
  border-color: rgba(155, 69, 20, .10);
  background: linear-gradient(180deg, #fffaf5 0%, #fff3e7 100%);
}

body.fv-theme-orange .card-header:first-child {
  border-radius: 19px 19px 0 0;
}

body.fv-theme-orange .list-group-item {
  color: var(--fv-text);
  background: rgba(255, 253, 249, .78);
  border-color: rgba(155, 69, 20, .09);
}

body.fv-theme-orange .list-group-item:hover {
  background: #fff5eb;
}

/* Azioni e controlli */
body.fv-theme-orange .btn {
  border-radius: 12px;
  font-weight: 750;
}

body.fv-theme-orange :is(.btn-primary, .bg-primary) {
  border-color: #ea580c !important;
  background-color: #ea580c !important;
}

body.fv-theme-orange .btn-primary {
  color: #fff;
  background-image: linear-gradient(135deg, #d94b08, #f97316);
  box-shadow: 0 9px 20px rgba(234, 88, 12, .20);
}

body.fv-theme-orange .btn-primary:hover,
body.fv-theme-orange .btn-primary:focus {
  border-color: #c2410c !important;
  background: linear-gradient(135deg, #c2410c, #ea580c) !important;
  transform: translateY(-1px);
}

body.fv-theme-orange :is(.btn-outline-primary, .text-primary) {
  color: #d94b08 !important;
}

body.fv-theme-orange .btn-outline-primary {
  border-color: rgba(234, 88, 12, .55);
}

body.fv-theme-orange .btn-outline-primary:hover {
  color: #fff !important;
  border-color: #ea580c;
  background: #ea580c;
}

body.fv-theme-orange .btn-dark,
body.fv-theme-orange .fv-auth-actions .btn-dark {
  color: #fff;
  border: 0;
  background: linear-gradient(135deg, #292524, #44403c);
}

body.fv-theme-orange :is(.form-control, .form-select, .input-group-text) {
  border-color: rgba(155, 69, 20, .16);
  background-color: #fffdf9;
  border-radius: 12px;
}

body.fv-theme-orange :is(.form-control, .form-select):focus {
  border-color: #fb923c;
  box-shadow: 0 0 0 .22rem rgba(249, 115, 22, .13);
}

body.fv-theme-orange .nav-tabs {
  border-color: rgba(155, 69, 20, .13);
}

body.fv-theme-orange .nav-tabs .nav-link {
  color: #6b5144;
  border-radius: 12px 12px 0 0;
  font-weight: 750;
}

body.fv-theme-orange .nav-tabs .nav-link.active {
  color: #c2410c;
  background: #fff8f1;
  border-color: rgba(234, 88, 12, .16) rgba(234, 88, 12, .16) #fff8f1;
}

/* Dashboard e pannelli */
body.fv-theme-orange .fv-panel-header-dark {
  color: #fff;
  background: linear-gradient(135deg, #292524, #44403c);
}

body.fv-theme-orange :is(.fv-panel-header-orange, .fv-panel-header-community) {
  color: #fff;
  background: linear-gradient(135deg, #c2410c, #f97316);
}

body.fv-theme-orange .fv-stat-card-gold {
  background: linear-gradient(135deg, #b45309, #f59e0b 58%, #fbbf24);
}

body.fv-theme-orange .fv-stat-card-green {
  background: linear-gradient(135deg, #315f3a, #4d8b58 58%, #6ca875);
}

body.fv-theme-orange .fv-stat-card-red {
  background: linear-gradient(135deg, #991b1b, #dc3f3f 58%, #ef6666);
}

body.fv-theme-orange .fv-stat-card-podium {
  background: linear-gradient(135deg, #3b302b, #6b4b38 56%, #c77b32);
}

body.fv-theme-orange .fv-btn-cta-primary {
  color: #9a3412;
  background: #fff !important;
}

body.fv-theme-orange .fv-btn-cta-secondary {
  color: #fff;
  background: rgba(255, 255, 255, .14) !important;
  border-color: rgba(255, 255, 255, .22) !important;
}

/* Tabelle e classifiche */
body.fv-theme-orange .table {
  --bs-table-color: #302925;
  --bs-table-bg: transparent;
  --bs-table-striped-bg: #fff7ef;
  --bs-table-hover-bg: #ffeddd;
  --bs-table-border-color: rgba(155, 69, 20, .10);
}

body.fv-theme-orange :is(.fv-table thead th, .table-dark th, .table-dark td) {
  color: #fff;
  background-color: #3b302b;
  border-color: rgba(255, 255, 255, .10);
}

body.fv-theme-orange :is(.fv-score-pill, .score-pill) {
  color: #fff;
  background: linear-gradient(135deg, #d94b08, #f97316);
}

/* Leghe e chat */
body.fv-theme-orange .chat-container {
  background:
    radial-gradient(circle at top right, rgba(251, 146, 60, .08), transparent 18rem),
    #fff9f3;
}

body.fv-theme-orange .chat-bubble {
  border: 1px solid rgba(155, 69, 20, .10);
  background: #fffdf9 !important;
}

body.fv-theme-orange .chat-bubble.bg-primary-subtle {
  background: #ffe7d2 !important;
}

/* Coppa */
body.fv-theme-orange .match-card {
  overflow: hidden;
  border-color: rgba(155, 69, 20, .13);
  border-radius: 14px;
  background: #fffdf9;
  box-shadow: 0 8px 20px rgba(111, 55, 20, .08);
}

body.fv-theme-orange .match-title {
  color: #4b3428;
  background: #fff0e2;
}

body.fv-theme-orange .main-final-card .match-title {
  color: #6b3d00;
  background: linear-gradient(90deg, #f6c453, #ffe09b);
}

body.fv-theme-orange .consolation-final-card .match-title {
  color: #fff;
  background: #44403c;
}

/* Footer */
body.fv-theme-orange .fv-footer {
  color: #75645b;
  border-top-color: rgba(234, 88, 12, .12);
  background: rgba(255, 250, 245, .90);
  box-shadow: 0 -8px 26px rgba(111, 55, 20, .05);
}

@media (max-width: 991.98px) {
  body.fv-theme-orange .fv-navbar .navbar-collapse {
    background: rgba(255, 253, 249, .98);
    border-color: rgba(234, 88, 12, .12);
  }
}

@media (max-width: 575.98px) {
  body.fv-theme-orange .row.g-5 {
    --bs-gutter-x: 1.5rem;
  }

  body.fv-theme-orange .fv-simple-hero {
    align-items: flex-start;
    flex-direction: column;
    border-radius: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.fv-theme-orange *,
  body.fv-theme-orange *::before,
  body.fv-theme-orange *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
