/**
 * JC Valdichiana Connector — Frontend Styles
 *
 * Stili grafici premium in stile Juventus (Dark/White/Gold/Magenta)
 * per la singola partita e le card in homepage.
 *
 * @package JCVC_Connector
 * @since   1.0.0
 */

/* ==========================================================================
   1. Stili Singola Partita (Single Page)
   ========================================================================== */

/* Override del tema Enfold per forzare la larghezza piena (nascondere sidebar e breadcrumbs) */
.single-jcvc_partita .sidebar, 
.single-jcvc_partita aside.sidebar_right,
.single-jcvc_partita .title_container,
.single-jcvc_partita h1.post-title,
.single-jcvc_partita h1.entry-title,
.single-jcvc_partita .entry-content-header {
	display: none !important;
}

.single-jcvc_partita #main .container_wrap_first .content,
.single-jcvc_partita #main .container_wrap_first main.content {
	width: 100% !important;
	border: none !important;
}

.jcvc-match-page-wrapper {
	width: 100%;
	/* margin: 20px auto; */
	margin: 0px auto;
	padding: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	color: #333333;
}

/* Contenitore principale del plugin per la singola pagina della partita (senza sidebars) */
.jcvc-single-partita-container {
	width: 100%;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

/* Card Intestazione Big (Stile Banner Nero Full Width nativo dello screenshot) */
.jcvc-match-header-card {
	background: #000000;
	color: #ffffff;
	padding: 15px 0 30px 0; /* Ridotto da 50px per alzare il titolo */
	border-bottom: 2px solid #D4AF37; /* Bordo oro Juventus */
	width: 100%;
	box-sizing: border-box;
	font-family: 'Juventus Fonts', 'Oswald', 'Roboto', sans-serif;
}

.jcvc-match-header-inner,
.jcvc-booking-bar-inner {
	/* max-width: 1130px; */ /* Allineato alla larghezza del contenuto del tema */
	max-width: 980px;
	width: 100%;
	margin: 0 auto;
	padding: 0 50px;
	box-sizing: border-box;
}

.jcvc-match-content-wrapper {
	max-width: 900px; /* Ristretto a 800px per rendere l'articolo più centrato e leggibile */
	width: 100%;
	margin: 0 auto;
	padding: 0 20px;
	box-sizing: border-box;
}

@media only screen and (max-width: 980px) /* era 1130px */ {
	.jcvc-match-header-inner,
	.jcvc-booking-bar-inner {
		max-width: 90%;
		padding: 0 20px;
	}
}

.jcvc-single-partita-container h1.jcvc-match-title-top {
	font-family: 'Juventus Fonts', 'Oswald', sans-serif !important;
	font-size: 26px !important;
	font-weight: 700 !important;
	color: #ffffff !important;
	display: block !important;
	margin: 0 0 20px 0 !important; /* Ridotto da 35px per alzare il titolo */
	text-transform: uppercase !important;
	letter-spacing: 0.5px !important;
	border-bottom: 1px solid #222 !important;
	padding-bottom: 15px !important;
	text-align: left !important; /* Allineato a sinistra perfettamente col logo del sito */
}

.jcvc-teams-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 80px;
	margin-bottom: 10px;
	flex-wrap: wrap;
	text-align: center;
}

.jcvc-team-display {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 200px;
}

.jcvc-team-logo-big {
	width: 140px;
	height: 140px;
	object-fit: contain;
	margin-bottom: 12px;
}

.jcvc-logo-fallback {
	width: 100px;
	height: 100px;
	border-radius: 50%;
	background: #333;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 24px;
	margin-bottom: 15px;
	text-transform: uppercase;
	border: 2px solid #D4AF37;
	font-family: 'Juventus Fonts', 'Oswald', sans-serif;
}

.jcvc-team-name-big {
	font-family: 'Juventus Fonts', 'Oswald', sans-serif;
	font-size: 26px; /* Aumentato da 20px */
	font-weight: 700;
	margin: 0;
	text-transform: uppercase;
	color: #ffffff;
	letter-spacing: 1px;
}

/* Centro (VS / Data / Stadio) */
.jcvc-center-display {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 220px;
	padding: 10px 0;
	font-family: 'Juventus Fonts', 'Oswald', sans-serif;
}

.jcvc-date-display {
	font-size: 24px;
	font-weight: 700;
	color: #ffffff;
	margin-bottom: 8px;
	text-transform: lowercase;
}

.jcvc-time-display {
	font-size: 36px;
	font-weight: 900;
	color: #ffffff; /* Colore bianco dello screenshot 1 */
	margin-bottom: 8px;
	text-transform: uppercase;
	line-height: 1;
}

.jcvc-stadium-display {
	font-size: 18px;
	color: #ffffff;
	font-weight: 500;
}

/* Barra di Prenotazione Orizzontale a larghezza intera nativa */
.jcvc-booking-bar {
	background: #f5f5f5; /* Sfondo grigio chiaro come lo screenshot */
	/* border-bottom: 1px solid #e2e8f0; */
	padding: 18px 0;
	max-width: 800px;
	width: 100%;
	margin: auto;
	box-sizing: border-box;
}

.jcvc-booking-bar-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 15px;
	font-family: 'Oswald', 'Juventus Fonts', sans-serif;
}

.jcvc-booking-bar-text {
	font-size: 20px;
	font-weight: 700;
	font-style: italic;
	color: #1e293b;
}

.jcvc-booking-closed-text {
	font-size: 16px;
	font-weight: 700;
	font-style: normal;
	color: #c62828;
	text-transform: uppercase;
}

.jcvc-booking-bar-action {
	display: flex;
	align-items: center;
}

.jcvc-btn-booking-bar {
	background: #000000;
	color: #ffffff !important;
	text-decoration: none !important;
	padding: 12px 28px;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 13px;
	border-radius: 4px;
	transition: background-color 0.2s ease;
	border: 1px solid #000000;
	letter-spacing: 0.5px;
}

.jcvc-btn-booking-bar:hover {
	background: #222222;
}

/* Sezione Dettagli (Flat, non più a scheda bianca, per rispecchiare lo screenshot) */
.jcvc-match-content-wrapper {
	width: 100%;
	/* margin-top: 40px; */
	margin-bottom: 30px;
	border-top: 1px solid #000000;
}

.jcvc-section-card {
	background: transparent !important;
	border: none !important;
	padding: 0 !important;
	box-shadow: none !important;
	box-sizing: border-box;
}
.jcvc-user-content {
	line-height: 1.8;
	font-size: 16px;
	color: #334155;
}

.jcvc-user-content h3 {
	font-size: 20px;
	font-weight: 700;
	color: #0f172a;
	margin-top: 30px;
	margin-bottom: 15px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.jcvc-user-content h3:first-child {
	margin-top: 0;
}

.jcvc-user-content hr {
	/* margin: 30px 0; */
	margin: 0;
	border: none;
	border-top: 1px solid #e2e8f0;
}

.jcvc-user-content ul {
	margin-left: 24px;
	margin-bottom: 25px;
	list-style-type: disc;
}

.jcvc-user-content li {
	margin-bottom: 10px;
}

/* Countdown e altri elementi opzionali */
.jcvc-badge {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.jcvc-badge-aperte {
	background: rgba(76, 175, 80, 0.1);
	color: #2e7d32;
	border: 1px solid #2e7d32;
}

.jcvc-badge-chiuse {
	background: rgba(244, 67, 54, 0.1);
	color: #c62828;
	border: 1px solid #c62828;
}

.jcvc-badge-esaurite {
	background: rgba(33, 33, 33, 0.1);
	color: #212121;
	border: 1px solid #212121;
}

.jcvc-badge-tbc {
	background: rgba(255, 152, 0, 0.1);
	color: #ef6c00;
	border: 1px solid #ef6c00;
}

/* Countdown */
.jcvc-countdown-wrapper {
	background: #fafafa;
	border: 1px solid #eaeaea;
	border-radius: 8px;
	padding: 15px;
	margin-bottom: 25px;
	text-align: center;
}

.jcvc-countdown-title {
	font-size: 12px;
	text-transform: uppercase;
	color: #666;
	margin-bottom: 4px;
	font-weight: 600;
}

.jcvc-countdown-date {
	font-size: 13px;
	font-weight: 700;
	color: #c62828;
	margin-bottom: 12px;
}

.jcvc-countdown-timer {
	display: flex;
	justify-content: center;
	gap: 15px;
}

.jcvc-time-unit {
	display: flex;
	flex-direction: column;
	min-width: 50px;
}

.jcvc-time-unit .num {
	font-size: 24px;
	font-weight: 800;
	color: #000;
	line-height: 1.1;
}

.jcvc-time-unit .lbl {
	font-size: 9px;
	text-transform: uppercase;
	color: #888;
	margin-top: 2px;
}

.jcvc-expired {
	color: #c62828;
	font-weight: 700;
	font-size: 14px;
	text-transform: uppercase;
}

/* Prezzo */
.jcvc-price-box {
	margin-bottom: 25px;
	text-align: center;
}

.jcvc-price-label {
	font-size: 12px;
	color: #666;
	text-transform: uppercase;
	font-weight: 600;
	margin-bottom: 4px;
}

.jcvc-price-value {
	font-size: 28px;
	font-weight: 800;
	color: #000;
}

.jcvc-price-value .cad {
	font-size: 12px;
	font-weight: 400;
	color: #666;
}

/* Pulsanti */
.jcvc-btn-booking {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: #E91E63; /* Magenta */
	color: #ffffff !important;
	text-decoration: none !important;
	padding: 14px 20px;
	border-radius: 8px;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 14px;
	transition: all 0.2s ease;
	box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
	text-align: center;
	margin-bottom: 12px;
}

.jcvc-btn-booking:hover {
	background: #d81b60;
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(233, 30, 99, 0.4);
}

.jcvc-btn-whatsapp {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: #25D366; /* WhatsApp Green */
	color: #ffffff !important;
	text-decoration: none !important;
	padding: 12px 20px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 13px;
	transition: all 0.2s ease;
	text-align: center;
}

.jcvc-btn-whatsapp:hover {
	background: #128C7E;
}

.jcvc-booking-inactive-msg {
	text-align: center;
	padding: 15px;
	background: #f9f9f9;
	border-radius: 8px;
	font-size: 14px;
	color: #666;
	line-height: 1.5;
	border: 1px dashed #ddd;
	margin-bottom: 15px;
}

/* Responsive Singola */
@media screen and (max-width: 900px) {
	.jcvc-match-grid {
		grid-template-columns: 1fr;
	}
	.jcvc-booking-box {
		position: static;
		margin-top: 20px;
	}
}

@media screen and (max-width: 600px) {
	.jcvc-match-header-card {
		padding: 25px 15px;
	}
	.jcvc-teams-row {
		gap: 20px;
	}
	.jcvc-team-display {
		width: 140px;
	}
	.jcvc-team-logo-big {
		width: 70px;
		height: 70px;
	}
	.jcvc-logo-fallback {
		width: 70px;
		height: 70px;
		font-size: 18px;
	}
	.jcvc-team-name-big {
		font-size: 16px;
	}
	.jcvc-vs-label {
		font-size: 20px;
	}
	.jcvc-score-display {
		font-size: 32px;
	}
}


/* ==========================================================================
   2. Stili Card Homepage (Shortcode [jcvc_partite])
   ========================================================================== */

/* Contenitore con posizionamento relativo per le frecce: padding laterale
   dedicato alle frecce, cosi' non si sovrappongono mai alle card. Larghezza
   massima tarata su "3 card + 2 gap + 2 padding frecce" cosi' su desktop
   standard non ne sborda una 4a. */
.jcvc-home-cards-wrap {
	position: relative;
	max-width: 840px; /* 3 * 260px + 2 * 6px + 2 * 24px */
	margin: 0 auto;
	padding: 0 24px;
	box-sizing: content-box;
}

.jcvc-home-cards-grid {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	gap: 6px;
	padding: 10px 0;
	margin: 20px 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	scrollbar-width: none;
}

.jcvc-home-cards-grid::-webkit-scrollbar {
	display: none;
}

/* Frecce di navigazione, strette e alte per occupare il minimo spazio
   orizzontale possibile: vivono nel padding riservato del contenitore,
   mai sopra le card. */
.jcvc-home-cards-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 20px;
	height: 64px;
	border-radius: 6px;
	border: none;
	background: #0a0a0a;
	color: #D4AF37;
	font-size: 14px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 10px rgba(0,0,0,0.25);
	transition: background 0.2s ease, opacity 0.2s ease;
}
.jcvc-home-cards-arrow:hover {
	background: #D4AF37;
	color: #0a0a0a;
}
.jcvc-home-cards-arrow--prev {
	left: 0;
}
.jcvc-home-cards-arrow--next {
	right: 0;
}
.jcvc-home-cards-arrow[disabled] {
	opacity: 0;
	pointer-events: none;
}
@media (max-width: 600px) {
	.jcvc-home-cards-wrap {
		padding: 0;
	}
	.jcvc-home-cards-arrow {
		display: none; /* su mobile lo scroll a dito resta il modo naturale */
	}
}

/* Singola Card */
.jcvc-home-card {
	flex: 0 0 260px;
	scroll-snap-align: start;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 0; /* Angoli squadrati come nel tuo screenshot */
	box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Mobile: una card per volta, quasi a piena larghezza, con un piccolo "peek"
   della successiva che segnala che c'e' altro da scorrere. */
@media (max-width: 600px) {
	.jcvc-home-cards-grid {
		gap: 12px;
		padding: 10px 4px;
		scroll-snap-type: x mandatory;
		scroll-padding-left: 4px;
	}
	.jcvc-home-card {
		flex: 0 0 88vw;
	}
}

.jcvc-home-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

/* Header Card */
.jcvc-home-card-header {
	background: #f8fafc;
	color: #0f172a;
	padding: 12px 15px;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	text-align: center;
	border-bottom: 1px solid #e2e8f0;
}

/* Body Card */
.jcvc-home-card-body {
	padding: 18px 8px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-grow: 1;
	gap: 4px;
}

/* Area Squadre (colonna sinistra) */
.jcvc-home-card-teams {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 1;
	min-width: 0; /* permette ai nomi squadra di restringersi invece di spingere fuori la data */
}

.jcvc-home-team {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 74px;
	text-align: center;
}

.jcvc-home-logo {
	width: 36px;
	height: 36px;
	object-fit: contain;
	margin-bottom: 6px;
}

.jcvc-home-logo-fallback {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #f1f5f9;
	color: #475569;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 14px;
	margin-bottom: 6px;
	border: 1px solid #cbd5e1;
}

.jcvc-home-team-name {
	font-size: 12px; /* Ingrandito da 11px */
	font-weight: 700;
	color: #1e293b;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	width: 100%;
}

/* Divisore Verticale Rosso */
.jcvc-home-divider {
	width: 1px;
	height: 46px; /* Incrementato da 40px */
	background-color: #ff003c;
	align-self: center;
}

/* Data (colonna destra) */
.jcvc-home-card-date {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	text-align: right;
	min-width: 66px;
	flex-shrink: 0; /* mai compressa: e' l'informazione che deve sempre restare leggibile */
	white-space: nowrap;
}

.jcvc-home-date-row {
	font-size: 12px; /* Ingrandito da 11px */
	color: #64748b;
	text-transform: lowercase;
}

.jcvc-home-date-main {
	display: flex;
	flex-direction: column;
	line-height: 1.1;
	margin: 2px 0;
	align-items: flex-end;
}

.jcvc-home-date-main .giorno {
	font-size: 26px; /* Ingrandito da 22px */
	font-weight: 800;
	color: #0f172a;
}

.jcvc-home-date-main .mese {
	font-size: 13px; /* Ingrandito da 12px */
	font-weight: 700;
	color: #0f172a;
	text-transform: lowercase;
}

.jcvc-home-time-row {
	font-size: 12px; /* Ingrandito da 11px */
	font-weight: 600;
	color: #64748b;
}

/* Bottone a fondo card */
.jcvc-home-card-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 12px 15px;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	color: #ffffff !important;
	text-decoration: none !important;
	letter-spacing: 0.5px;
	transition: background-color 0.2s ease;
	border-radius: 0;
}

.jcvc-home-card-btn .chevron {
	margin-left: 8px;
	font-size: 16px;
	line-height: 1;
}

/* Variazioni colori bottone in base allo stato (Home) */
.jcvc-btn-stato-aperte {
	background-color: #ff003c; /* Rosso/Magenta come screenshot */
}

.jcvc-btn-stato-aperte:hover {
	background-color: #d60032;
}

.jcvc-btn-stato-chiuse {
	background-color: #64748b;
}

.jcvc-btn-stato-chiuse:hover {
	background-color: #475569;
}

.jcvc-btn-stato-esaurite {
	background-color: #0f172a;
}

.jcvc-btn-stato-esaurite:hover {
	background-color: #020617;
}

.jcvc-btn-stato-tbc {
	background-color: #d97706;
}

.jcvc-btn-stato-tbc:hover {
	background-color: #b45309;
}

.jcvc-btn-stato-da-aprire {
	background-color: #334155;
}

.jcvc-btn-stato-da-aprire:hover {
	background-color: #1e293b;
}

/* ==========================================================================
   3. Stili Box Scadenze e Countdown (Timeline Box)
   ========================================================================== */

.jcvc-match-timeline-box {
	display: flex;
	border: 1px solid #1a1a1a;
	margin: 25px 0;
	font-family: 'Oswald', 'Juventus Fonts', sans-serif;
	background: #ffffff;
	box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}

.jcvc-match-timeline-box .jcvc-timeline-col {
	flex: 1;
	padding: 25px;
	text-align: center;
	box-sizing: border-box;
}

.jcvc-match-timeline-box .jcvc-timeline-col:first-child {
	border-right: 1px solid #1a1a1a;
}

.jcvc-match-timeline-box .jcvc-timeline-title {
	font-family: 'Oswald', 'Juventus Fonts', sans-serif !important;
	font-size: 18px !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	margin: 0 0 10px 0 !important;
	color: #1a1a1a !important;
	letter-spacing: 0.5px !important;
}

.jcvc-match-timeline-box .jcvc-timeline-subtitle {
	font-size: 14px;
	font-style: italic;
	margin: -5px 0 10px 0;
	color: #666;
}

.jcvc-match-timeline-box .jcvc-timeline-target {
	font-size: 14px;
	margin: 0 0 10px 0;
	color: #1a1a1a;
}

.jcvc-match-timeline-box .jcvc-timeline-dates {
	font-size: 13px;
	font-style: italic;
	color: #333;
	margin: 0;
	line-height: 1.4;
}

/* Countdown dentro la timeline */
.jcvc-match-timeline-box .jcvc-countdown-wrapper {
	background: transparent !important;
	border: none !important;
	border-radius: 0 !important;
	padding: 0 !important;
	margin-bottom: 20px !important;
	text-align: center !important;
}

.jcvc-match-timeline-box .jcvc-countdown-timer-container {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	font-family: 'Oswald', 'Juventus Fonts', sans-serif;
}

.jcvc-match-timeline-box .jcvc-countdown-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 50px;
}

.jcvc-match-timeline-box .jcvc-countdown-digit {
	font-size: 32px;
	font-weight: 700;
	color: #1a1a1a;
	line-height: 1;
}

.jcvc-match-timeline-box .jcvc-countdown-label {
	font-size: 10px;
	text-transform: uppercase;
	color: #666;
	margin-top: 4px;
	font-weight: 500;
}

.jcvc-match-timeline-box .jcvc-countdown-divider {
	width: 1px;
	height: 30px;
	background-color: #1a1a1a;
	align-self: center;
}

.jcvc-match-timeline-box .jcvc-expired {
	font-size: 14px;
	font-weight: 700;
	color: #c62828;
	text-transform: uppercase;
}

/* Layout mobile per Timeline e Barra di Prenotazione */
@media screen and (max-width: 600px) {
	.jcvc-match-timeline-box {
		flex-direction: column;
	}
	.jcvc-match-timeline-box .jcvc-timeline-col:first-child {
		border-right: none;
		border-bottom: 1px solid #1a1a1a;
	}
	.jcvc-booking-bar-inner {
		flex-direction: column;
		text-align: center;
		padding: 0 20px;
		gap: 12px;
	}
	.jcvc-booking-bar-action {
		width: 100%;
		justify-content: center;
	}
	.jcvc-btn-booking-bar {
		width: 100%;
		text-align: center;
		box-sizing: border-box;
	}
}
