/**
 * GDC Zone 4: Your Day — Styles
 * S7 §5: Block-based day-in-the-life timeline
 *
 * @package GDC
 * @since   5.0.0
 */

/* S7 §5: Zone container */
.gdc-zone-4-day {
	background: var(--gdc-bg-deep);
}

/* S7 §5: Inner wrapper */
.gdc-day__inner {
	max-width: var(--gdc-max-narrow);
	margin: 0 auto;
	padding: var(--gdc-section-py-mobile) var(--gdc-section-px-mobile);
}

/* ==============================
   TAB SYSTEM
   ============================== */

/* S7 §5.3: Tab container */
.gdc-day__tabs {
	display: flex;
	gap: 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	margin-bottom: var(--gdc-space-5);
}

/* S7 §5.3: Individual tab */
.gdc-day__tab {
	flex: 1;
	appearance: none;
	border: none;
	background: transparent;
	padding: var(--gdc-space-2) var(--gdc-space-3);
	font-family: var(--gdc-font-body);
	font-size: 1rem;
	font-weight: 400;
	color: var(--gdc-white-dim);
	cursor: pointer;
	border-bottom: 2px solid transparent;
	min-height: 48px;
	transition: color var(--gdc-duration-fast, 150ms) var(--gdc-ease-default, ease),
	            border-color var(--gdc-duration-fast, 150ms) var(--gdc-ease-default, ease);
}

.gdc-day__tab:hover {
	color: var(--gdc-white-muted);
}

.gdc-day__tab:focus-visible {
	outline: 2px solid var(--gdc-purple);
	outline-offset: -2px;
}

/* S7 §5.3: Active tab */
.gdc-day__tab--active {
	color: var(--gdc-white);
	font-weight: 600;
	border-bottom-color: var(--gdc-purple);
}

/* ==============================
   TIMELINE
   ============================== */

/* S7 §5.4: Timeline container */
.gdc-day__timeline {
	position: relative;
}

.gdc-day__timeline[hidden] {
	display: none;
}

/* S7 §5.4: Timeline block */
.gdc-day__block {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--gdc-space-1);
	padding-bottom: 32px;
}

.gdc-day__block:last-child {
	padding-bottom: 0;
}

/* S7 §5.4: Time marker */
.gdc-day__time {
	font-family: var(--gdc-font-heading);
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--gdc-white);
	line-height: 1;
}

/* S7 §5.4: Moment content */
.gdc-day__moment {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.gdc-day__moment-title {
	font-family: var(--gdc-font-heading);
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--gdc-white);
	margin: 0;
	line-height: 1.3;
}

.gdc-day__moment-text {
	font-family: var(--gdc-font-body);
	font-size: 1rem;
	line-height: 1.7;
	color: var(--gdc-white-muted);
	margin: 0;
}

/* ==============================
   PEAK MOMENT
   ============================== */

/* S7 §5.7: Peak moment block */
.gdc-day__block--peak {
	border-left: 4px solid var(--gdc-purple);
	background: var(--gdc-surface, var(--gdc-bg-abyss, #141B24));
	border-radius: var(--gdc-radius-lg, 12px);
	padding: 20px;
	margin-bottom: 32px;
}

.gdc-day__block--peak:last-child {
	margin-bottom: 0;
}

/* S7 §5.7: Peak label */
.gdc-day__peak-label {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: var(--gdc-space-2);
	color: var(--gdc-purple);
	font-family: var(--gdc-font-body);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.gdc-day__peak-label svg {
	flex-shrink: 0;
}

/* ==============================
   REUNION BLOCK (NON-DIVER)
   ============================== */

.gdc-day__block--reunion {
	border-left: 2px solid var(--gdc-alpha-20);
	padding-left: var(--gdc-space-3);
}

/* ==============================
   CONDITIONAL BLOCKS
   ============================== */

/* S7 §5.8: Arrival day (desktop only) */
.gdc-day__arrival {
	display: none;
	padding-bottom: var(--gdc-space-5);
	margin-bottom: var(--gdc-space-5);
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.gdc-day__arrival-title,
.gdc-day__last-day-title,
.gdc-day__rest-day-title {
	font-family: var(--gdc-font-heading);
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--gdc-white);
	margin: 0 0 var(--gdc-space-1);
}

.gdc-day__arrival-text,
.gdc-day__last-day-text,
.gdc-day__rest-day-text {
	font-family: var(--gdc-font-body);
	font-size: 1rem;
	line-height: 1.7;
	color: var(--gdc-white-muted);
	margin: 0;
}

/* S7 §5.8: Last-day and rest-day addendum blocks */
.gdc-day__last-day,
.gdc-day__rest-day {
	margin-top: var(--gdc-space-5);
	padding-top: var(--gdc-space-5);
	border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ==============================
   MOBILE PREVIEW
   ============================== */

/* S7 §5.2: Preview blocks in collapsed state */
.gdc-day__preview {
	display: flex;
	flex-direction: column;
	gap: var(--gdc-space-2);
	padding-top: var(--gdc-space-2);
}

.gdc-day__preview-block {
	display: flex;
	align-items: baseline;
	gap: var(--gdc-space-2);
}

.gdc-day__preview-time {
	font-family: var(--gdc-font-heading);
	font-size: var(--gdc-text-sm);
	font-weight: 600;
	color: var(--gdc-white-dim);
	min-width: 40px;
}

.gdc-day__preview-text {
	font-family: var(--gdc-font-body);
	font-size: var(--gdc-text-sm);
	color: var(--gdc-white-muted);
}

.gdc-day__preview-more {
	font-family: var(--gdc-font-body);
	font-size: var(--gdc-text-sm);
	font-weight: 500;
	color: var(--gdc-purple);
	margin-top: var(--gdc-space-1);
}

/* S7 §5.2: Hide preview when zone is expanded */
.gdc-zone-details[open] .gdc-day__preview {
	display: none;
}

/* ==============================
   TABLET (768px+)
   ============================== */

@media (min-width: 768px) {
	.gdc-day__inner {
		padding: var(--gdc-space-10) var(--gdc-space-4);
	}

	.gdc-day__block {
		padding-bottom: 40px;
	}

	.gdc-day__block:last-child {
		padding-bottom: 0;
	}
}

/* ==============================
   DESKTOP (1200px+)
   ============================== */

@media (min-width: 1200px) {
	.gdc-day__inner {
		padding: var(--gdc-section-py-desktop) var(--gdc-space-4);
	}

	/* S7 §5.4: Desktop two-column layout — time left, content right */
	.gdc-day__block {
		grid-template-columns: 80px 1fr;
		gap: var(--gdc-space-3);
		align-items: start;
	}

	/* S7 §5.4: Vertical connector line */
	.gdc-day__timeline::before {
		content: '';
		position: absolute;
		left: 39px;
		top: 0;
		bottom: 0;
		width: 1px;
		background: rgba(255, 255, 255, 0.06);
	}

	/* S7 §5.7: Peak block desktop adjustments */
	.gdc-day__block--peak {
		grid-template-columns: 80px 1fr;
		position: relative;
	}

	.gdc-day__block--peak .gdc-day__peak-label {
		grid-column: 2;
	}

	.gdc-day__block--peak .gdc-day__time {
		grid-row: 2;
	}

	.gdc-day__block--peak .gdc-day__moment {
		grid-row: 2;
	}

	/* S7 §5.8: Show arrival block on desktop */
	.gdc-day__arrival {
		display: block;
	}

	/* S7 §5.6: Reunion block alignment */
	.gdc-day__block--reunion {
		border-left-width: 2px;
	}
}

/* ==============================
   SCROLL FADE-IN
   ============================== */

@media (prefers-reduced-motion: no-preference) {
	.gdc-day__inner {
		opacity: 0;
		transform: translateY(var(--gdc-scroll-slide-distance));
		transition:
			opacity var(--gdc-scroll-fade-duration) var(--gdc-ease-default),
			transform var(--gdc-scroll-fade-duration) var(--gdc-ease-default);
	}

	.gdc-day__inner.se-visible {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.gdc-day__inner {
		opacity: 1;
		transform: none;
	}
}
