/* ==========================================================================
   Webvizion Venue Calendar — Frontend
   ========================================================================== */

.wvc-frontend{
	--wvc-bg: #0f1115;
	--wvc-surface: #1a1d23;
	--wvc-border: #2a2e37;
	--wvc-text: #e8eaed;
	--wvc-text-muted: #8b93a1;
	--wvc-primary: #64748b;
	--wvc-primary-soft: color-mix(in srgb, var(--wvc-primary) 14%, var(--wvc-surface));
	--wvc-available: #22c55e;
	--wvc-reserved: #f59e0b;
	--wvc-unavailable: #ef4444;
	--wvc-venue-heading: #f4f6f8;
	--wvc-month-label: #f4f6f8;
	--wvc-weekday-label: #8b93a1;
	--wvc-day-panel-heading: #f4f6f8;
	--wvc-modal-heading: #f4f6f8;
	--wvc-summary-bg: #20242c;
	--wvc-field-label: #8b93a1;
	--wvc-input-bg: #1a1d23;
	--wvc-input-text: #e8eaed;
	--wvc-input-focus: #64748b;
	--wvc-nav-bg: #1a1d23;
	--wvc-venue-meta: #8b93a1;
	--wvc-intro-text: #8b93a1;
	--wvc-input-focus-soft: color-mix(in srgb, var(--wvc-input-focus) 22%, var(--wvc-surface));
	--wvc-radius-lg: 20px;
	--wvc-radius-md: 14px;
	--wvc-radius-sm: 10px;
	--wvc-shadow-md: 0 8px 30px rgba(16,24,40,0.08);
	--wvc-shadow-lg: 0 20px 50px rgba(16,24,40,0.16);

	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--wvc-text);
	max-width: 720px;
	margin: 0 auto;
	background: var(--wvc-surface);
	border: 1px solid var(--wvc-border);
	border-radius: var(--wvc-radius-lg);
	padding: 24px;
	box-shadow: var(--wvc-shadow-md);
	position: relative;
}

.wvc-frontend.wvc-theme-dark{
	--wvc-bg: #0f1117;
	--wvc-surface: #171923;
	--wvc-border: #262936;
	--wvc-text: #f3f4f6;
	--wvc-text-muted: #9ca3af;
	--wvc-primary-soft: #1e1f36;
}

@media (prefers-color-scheme: dark){
	.wvc-frontend.wvc-theme-auto{
		--wvc-bg: #0f1117;
		--wvc-surface: #171923;
		--wvc-border: #262936;
		--wvc-text: #f3f4f6;
		--wvc-text-muted: #9ca3af;
		--wvc-primary-soft: #1e1f36;
	}
}

.wvc-frontend *{ box-sizing: border-box; }

.wvc-fc-header{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:18px; flex-wrap:wrap; }
.wvc-fc-venue-info{ display:flex; align-items:center; gap:12px; }
.wvc-fc-venue-thumb{ width:52px; height:52px; border-radius: 14px; background-size:cover; background-position:center; flex-shrink:0; }
.wvc-fc-venue-info h3{ margin:0; font-size:17px; font-weight:700; letter-spacing:-0.01em; color: var(--wvc-venue-heading); }
.wvc-fc-venue-info p{ margin:2px 0 0; font-size:12.5px; color: var(--wvc-venue-meta); }

.wvc-fc-legend{ display:flex; gap:14px; font-size:12px; color: var(--wvc-text-muted); }
.wvc-fc-legend span{ display:flex; align-items:center; gap:5px; }
.wvc-dot{ display:inline-block; width:9px; height:9px; border-radius:50%; }
.wvc-dot-available{ background: var(--wvc-available); }
.wvc-dot-reserved{ background: var(--wvc-reserved); }
.wvc-dot-unavailable{ background: var(--wvc-unavailable); }

.wvc-fc-toolbar{ display:flex; align-items:center; justify-content:space-between; margin-bottom: 14px; }
.wvc-fc-month-label{ font-weight:700; font-size:15px; letter-spacing:-0.01em; color: var(--wvc-month-label); }
.wvc-fc-nav{
	width:34px !important; height:34px !important; min-width:34px; max-width:34px;
	border-radius:50% !important; box-sizing:border-box; flex-shrink:0;
	padding:0 !important; margin:0;
	background: var(--wvc-nav-bg) !important;
	display:flex; align-items:center; justify-content:center; line-height:1;
	cursor:pointer; font-size:16px; color: var(--wvc-text);
	transition: background .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.wvc-fc-nav:hover{ background: var(--wvc-primary-soft) !important; border-color: var(--wvc-primary) !important; color: var(--wvc-primary) !important; }
.wvc-fc-nav:active{ transform: scale(0.94); }

.wvc-fc-grid-wrap{ position:relative; min-height: 240px; }
.wvc-fc-weekdays{ display:grid; grid-template-columns: repeat(7,1fr); text-align:center; font-size:11px; color: var(--wvc-weekday-label); font-weight:600; margin-bottom:6px; text-transform:uppercase; letter-spacing:.03em; }
.wvc-fc-grid{ display:grid; grid-template-columns: repeat(7,1fr); gap:6px; }

.wvc-fc-day{
	aspect-ratio: 1 / 0.85;
	border-radius: var(--wvc-radius-sm);
	border: 1px solid var(--wvc-border);
	background: var(--wvc-bg);
	display:flex; flex-direction:column; align-items:center; justify-content:center;
	cursor:pointer; position:relative; font-size:13px; font-weight:600;
	transition: transform .15s ease, box-shadow .15s ease;
}
.wvc-fc-day:hover:not(.wvc-fc-day-empty):not(.wvc-fc-day-past){ transform: translateY(-2px); box-shadow: var(--wvc-shadow-md); border-color: var(--wvc-primary); }
.wvc-fc-day.wvc-fc-day-empty{ visibility:hidden; cursor:default; }
.wvc-fc-day.wvc-fc-day-past{ opacity:.35; cursor:not-allowed; }
.wvc-fc-day.wvc-fc-day-selected{ outline: 2px solid var(--wvc-primary); outline-offset: -2px; }
.wvc-fc-day .wvc-fc-day-num{ font-size: 13.5px; }
.wvc-fc-day .wvc-fc-day-dots{ display:flex; gap:3px; margin-top:4px; }
.wvc-fc-day .wvc-fc-day-dots span{ width:5px;height:5px;border-radius:50%; }
.wvc-fc-day.wvc-fc-day-today{ border-color: var(--wvc-primary); }
.wvc-fc-day.wvc-fc-day-full{ background: color-mix(in srgb, var(--wvc-unavailable) 12%, var(--wvc-bg)); }
.wvc-fc-day.wvc-fc-day-partial{ background: color-mix(in srgb, var(--wvc-reserved) 12%, var(--wvc-bg)); }
.wvc-fc-day.wvc-fc-day-open{ background: color-mix(in srgb, var(--wvc-available) 10%, var(--wvc-bg)); }
.wvc-fc-day.wvc-fc-day-closed{ background: repeating-linear-gradient(45deg, var(--wvc-bg), var(--wvc-bg) 4px, var(--wvc-border) 4px, var(--wvc-border) 5px); cursor:not-allowed; }

.wvc-fc-loading{
	position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
	background: var(--wvc-surface); color: var(--wvc-text-muted); font-size:13px; border-radius: var(--wvc-radius-md);
	opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.wvc-fc-grid-wrap.wvc-loading .wvc-fc-loading{ opacity:1; pointer-events:all; }

.wvc-fc-day-panel{ margin-top:18px; border-top:1px solid var(--wvc-border); padding-top:16px; }
.wvc-fc-day-panel h4{ margin:0 0 10px; font-size:14px; font-weight:700; color: var(--wvc-day-panel-heading); }
.wvc-fc-slots{ display:grid; grid-template-columns: repeat(auto-fill, minmax(96px,1fr)); gap:8px; }
.wvc-fc-slot{
	padding:9px 8px; text-align:center; border-radius: var(--wvc-radius-sm); font-size:12.5px; font-weight:600;
	border: 1px solid var(--wvc-border); cursor:pointer; transition: all .15s ease; background: var(--wvc-bg);
}
.wvc-fc-slot.wvc-fc-slot-available{ color: var(--wvc-available); }
.wvc-fc-slot.wvc-fc-slot-available:hover{ background: var(--wvc-available); color:#fff; border-color: transparent; transform: translateY(-1px); }
.wvc-fc-slot.wvc-fc-slot-unavailable, .wvc-fc-slot.wvc-fc-slot-reserved{
	color: var(--wvc-text-muted); cursor:not-allowed; opacity:.6; text-decoration: line-through;
}

/* Modal (scoped clone of admin modal styles so shortcode works standalone) */
.wvc-frontend .wvc-modal-overlay{
	position: fixed; inset:0; background: rgba(15,17,23,0.5); backdrop-filter: blur(6px);
	display:flex; align-items:center; justify-content:center; z-index: 100000;
	opacity:0; pointer-events:none; transition: opacity .25s ease;
}
.wvc-frontend .wvc-modal-overlay.wvc-open{ opacity:1; pointer-events:all; }
.wvc-frontend .wvc-modal{
	background: var(--wvc-surface); border-radius: var(--wvc-radius-lg); width:100%; max-width:480px;
	max-height:88vh; overflow-y:auto; box-shadow: var(--wvc-shadow-lg); border:1px solid var(--wvc-border);
	transform: translateY(16px) scale(.97); transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.wvc-frontend .wvc-modal-overlay.wvc-open .wvc-modal{ transform: translateY(0) scale(1); }
.wvc-frontend .wvc-modal-header{ display:flex; justify-content:space-between; align-items:center; padding:20px 24px; border-bottom:1px solid var(--wvc-border); position:sticky; top:0; background:var(--wvc-surface); }
.wvc-frontend .wvc-modal-header h2{ margin:0; font-size:16px; font-weight:700; color: var(--wvc-modal-heading); }
.wvc-frontend .wvc-modal-close{ background:none; border:none; font-size:22px; cursor:pointer; color: var(--wvc-text-muted); }
.wvc-frontend .wvc-modal-body{ padding: 20px 24px; }
.wvc-frontend .wvc-modal-footer{ padding:16px 24px; border-top:1px solid var(--wvc-border); display:flex; justify-content:flex-end; gap:10px; }
.wvc-frontend .wvc-fc-intro{ color: var(--wvc-intro-text); font-size:13px; margin-top:0; }
.wvc-frontend .wvc-fc-summary{
	background: var(--wvc-summary-bg); border-radius: var(--wvc-radius-sm); padding:12px 14px; margin-bottom:16px; font-size:13px;
}
.wvc-frontend .wvc-field{ margin-bottom:14px; }
.wvc-frontend .wvc-field label{ display:block; font-size:12.5px; font-weight:600; color: var(--wvc-field-label); margin-bottom:6px; }
.wvc-frontend .wvc-field input, .wvc-frontend .wvc-field select, .wvc-frontend .wvc-field textarea{
	width:100%; padding:10px 12px; border-radius: var(--wvc-radius-sm);
	border:1px solid var(--wvc-border) !important;
	background: var(--wvc-input-bg) !important; color: var(--wvc-input-text) !important; font-size:13.5px;
}
.wvc-frontend .wvc-field input:focus, .wvc-frontend .wvc-field select:focus, .wvc-frontend .wvc-field textarea:focus{
	outline:none; border-color: var(--wvc-input-focus) !important; box-shadow: 0 0 0 3px var(--wvc-input-focus-soft);
}
.wvc-frontend .wvc-field-row{ display:grid; grid-template-columns: 1fr 1fr; gap:12px; }
.wvc-frontend .wvc-hp-field{ position:absolute; left:-9999px; width:1px; height:1px; opacity:0; }
.wvc-frontend .wvc-btn{
	padding:10px 18px; border-radius: var(--wvc-radius-sm); border:none; background: var(--wvc-primary); color:#fff;
	font-weight:600; font-size:13.5px; cursor:pointer; transition: all .15s ease;
}
.wvc-frontend .wvc-btn:hover{ filter: brightness(1.08); transform: translateY(-1px); }
.wvc-frontend .wvc-btn-secondary{ background: var(--wvc-bg); color: var(--wvc-text); border:1px solid var(--wvc-border); }
.wvc-frontend .wvc-btn:disabled{ opacity:.6; cursor:not-allowed; transform:none; }
.wvc-frontend .wvc-fc-form-message{ padding:10px 12px; border-radius: var(--wvc-radius-sm); font-size:13px; margin-top:6px; }
.wvc-frontend .wvc-fc-form-message.wvc-success{ background: rgba(16,185,129,0.12); color: var(--wvc-available); }
.wvc-frontend .wvc-fc-form-message.wvc-error{ background: rgba(239,68,68,0.12); color: var(--wvc-unavailable); }

@media (max-width: 480px){
	.wvc-frontend{ padding:16px; border-radius:16px; }
	.wvc-fc-legend{ width:100%; justify-content:space-between; }
	.wvc-frontend .wvc-field-row{ grid-template-columns: 1fr; }
	.wvc-frontend .wvc-modal{ max-width: 100%; margin: 12px; border-radius: 18px; }
}
