/**
 * Istanbul Flight Center — rezervasyon ön yüz stilleri.
 * Renkler panelden gelen CSS değişkenleriyle yönetilir (.ifc-booking inline style).
 */

.ifc-booking {
	--ifc-primary: #1e73be;
	--ifc-on-primary: #ffffff;
	--ifc-available: #46b450;
	--ifc-booked: #dc3232;
	--ifc-closed: #dcdcde;
	max-width: 1120px;
	margin: 0 auto;
	font-size: 15px;
	line-height: 1.5;
	color: #1f2937;
}

.ifc-notice {
	border-left: 4px solid var(--ifc-primary);
	background: rgba(30, 115, 190, 0.06);
	padding: 12px 16px;
	margin: 0 0 20px;
	border-radius: 4px;
}

.ifc-empty {
	padding: 16px;
	background: #f3f4f6;
	border-radius: 6px;
}

.ifc-muted { color: #6b7280; font-size: 14px; }
.ifc-loading { color: #6b7280; }
.ifc-hint { font-size: 13px; color: #6b7280; margin: 0 0 10px; }
.ifc-step__title { font-size: 17px; font-weight: 700; margin: 0 0 6px; }

/* Simülatör sekmeleri */
.ifc-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }

.ifc-tab {
	border: 1px solid var(--ifc-primary);
	background: transparent;
	color: var(--ifc-primary);
	padding: 8px 16px;
	border-radius: 999px;
	cursor: pointer;
	font: inherit;
	transition: background 0.15s ease, color 0.15s ease;
}

.ifc-tab:hover { background: rgba(30, 115, 190, 0.1); }
.ifc-tab.is-active { background: var(--ifc-primary); color: var(--ifc-on-primary); }

/* Kategoriler */
.ifc-categories { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 18px; }
.ifc-categories__label { font-weight: 600; }

.ifc-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	background: #f3f4f6;
	color: #1f2937;
	border-radius: 999px;
	font-size: 14px;
	line-height: 1.4;
	text-shadow: none;
}

.ifc-chip--btn { border: 1px solid #d1d5db; cursor: pointer; font: inherit; color: #1f2937; transition: border-color 0.15s, box-shadow 0.15s; }
.ifc-chip--btn:hover { background: #eceef1; color: #1f2937; }
.ifc-chip--btn.is-active { border-color: var(--ifc-primary); box-shadow: 0 0 0 2px rgba(30, 115, 190, 0.18); background: #fff; color: #1f2937; }

.ifc-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

/* İki sütun: takvim + form */
.ifc-cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.ifc-cal { flex: 1 1 560px; min-width: 0; }
.ifc-form-col { flex: 1 1 280px; }

/* Takvim başlığı + navigasyon */
.ifc-cal-head { display: flex; justify-content: space-between; align-items: center; margin: 0 0 10px; gap: 10px; flex-wrap: wrap; }
.ifc-cal-title { font-size: 20px; font-weight: 700; }
.ifc-cal-nav { display: flex; gap: 6px; }

.ifc-navbtn {
	background: var(--ifc-primary);
	color: var(--ifc-on-primary);
	border: none;
	padding: 7px 14px;
	border-radius: 6px;
	font: inherit;
	cursor: pointer;
}
.ifc-navbtn:hover { filter: brightness(0.93); }

/* Takvim tablosu */
.ifc-calendar { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ifc-calendar th {
	background: var(--ifc-primary);
	color: var(--ifc-on-primary);
	font-weight: 600;
	font-size: 13px;
	padding: 8px 4px;
	border: 1px solid rgba(255, 255, 255, 0.25);
}

.ifc-cell {
	height: 62px;
	vertical-align: top;
	border: 1px solid #e5e7eb;
	padding: 4px 6px;
	background: #fff;
}

.ifc-cell__num { font-size: 13px; font-weight: 600; color: #374151; }
.ifc-cell__meta { font-size: 11px; line-height: 1.35; margin-top: 2px; }
.ifc-cell__price { font-weight: 700; }
.ifc-cell__avail { color: #6b7280; }

.ifc-cell.is-out { background: #f7f8fa; }
.ifc-cell.is-out .ifc-cell__num { color: #c2c6cc; }

.ifc-cell.is-open {
	background: rgba(70, 180, 80, 0.14);
	cursor: pointer;
}
.ifc-cell.is-open:hover { background: rgba(70, 180, 80, 0.26); }
.ifc-cell.is-open .ifc-cell__num { color: #166534; }
.ifc-cell.is-open .ifc-cell__price { color: #166534; }

.ifc-cell.is-booked { background: rgba(220, 50, 50, 0.12); }
.ifc-cell.is-booked .ifc-cell__avail { color: var(--ifc-booked); }

.ifc-cell.is-closed { background: #f3f4f6; }

.ifc-cell.is-selected { outline: 3px solid var(--ifc-primary); outline-offset: -3px; }

/* Admin takvimi: gün durum renkleri (uçuş olan günler) */
.ifc-admin-res .ifc-cell--attention { background: rgba(245, 158, 11, 0.18); }
.ifc-admin-res .ifc-cell--attention .ifc-cell__avail { color: #b45309; font-weight: 600; }
.ifc-admin-res .ifc-cell--instructor { background: rgba(249, 115, 22, 0.16); }
.ifc-admin-res .ifc-cell--instructor .ifc-cell__avail { color: #c2410c; font-weight: 600; }
.ifc-admin-res .ifc-cell--ready { background: rgba(30, 64, 175, 0.12); }
.ifc-admin-res .ifc-cell--ready .ifc-cell__avail { color: #1e40af; font-weight: 600; }
.ifc-admin-res .ifc-cell--past { background: #f1f2f4; }
.ifc-admin-res .ifc-cell--past .ifc-cell__num,
.ifc-admin-res .ifc-cell--past .ifc-cell__avail { color: #9aa1ab; }

/* Admin takvimi: bugün — belirgin siyah çerçeve (inset gölge; layout kaymaz) */
.ifc-admin-res .ifc-cell--today { box-shadow: inset 0 0 0 2px #111827; }
.ifc-admin-res .ifc-cell--today .ifc-cell__num { color: #111827; font-weight: 800; }

/* Gün altına açılan slot satırı */
.ifc-slotrow { background: #fbfcfe; border: 1px solid #e5e7eb; padding: 12px 10px; }

.ifc-grid { display: flex; flex-direction: column; gap: 4px; margin: 0; }

.ifc-slot {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 5px;
	padding: 8px 12px;
	font-size: 14px;
	user-select: none;
	/* Slotlar checkbox gibi tek tıkla seçilir; sürükleme yok, sayfa serbestçe kayar. */
	touch-action: manipulation;
}

.ifc-slot__tag { font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }

.ifc-slot--available { background: rgba(70, 180, 80, 0.16); border-color: rgba(70, 180, 80, 0.5); cursor: pointer; }
.ifc-slot--available:hover { background: rgba(70, 180, 80, 0.28); }
.ifc-slot--booked { background: rgba(220, 50, 50, 0.14); border-color: rgba(220, 50, 50, 0.45); color: #7f1d1d; cursor: not-allowed; }
.ifc-slot--closed { background: #f3f4f6; color: #6b7280; cursor: not-allowed; }

.ifc-slot.is-selected {
	background: #1f2937;
	color: #fff;
	border-color: #1f2937;
}
.ifc-slot.is-selected .ifc-slot__tag { color: #d1d5db; }

/* Ön yüz: slotlar bağımsız CHECKBOX gibi seçilir (mobil + masaüstü aynı).
   Admin ekranı kendi .ifc-slot.is-selected (koyu) stilini kullanmaya devam eder. */
.ifc-booking .ifc-slot { justify-content: flex-start; gap: 10px; }
.ifc-booking .ifc-slot__time { flex: 1; }
.ifc-slot__box {
	width: 20px;
	height: 20px;
	flex: 0 0 auto;
	border: 2px solid #b6bcc4;
	border-radius: 5px;
	background: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background .12s, border-color .12s;
}
.ifc-slot--booked .ifc-slot__box,
.ifc-slot--closed .ifc-slot__box { visibility: hidden; }
.ifc-booking .ifc-slot--available:hover .ifc-slot__box { border-color: var(--ifc-primary); }
.ifc-booking .ifc-slot--available:focus-visible { outline: 2px solid var(--ifc-primary); outline-offset: 1px; }
/* Seçili slot: açık mavi zemin + kutuda primary ✓ (checkbox hissi). */
.ifc-booking .ifc-slot.is-selected {
	background: rgba(30, 115, 190, 0.10);
	color: #1f2937;
	border-color: var(--ifc-primary);
	box-shadow: inset 0 0 0 1px var(--ifc-primary);
}
.ifc-booking .ifc-slot.is-selected .ifc-slot__box {
	border-color: var(--ifc-primary);
	background: var(--ifc-primary);
}
.ifc-booking .ifc-slot.is-selected .ifc-slot__box::after {
	content: '✓';
	color: #fff;
	font-size: 14px;
	font-weight: 900;
	line-height: 1;
}
.ifc-booking .ifc-slot.is-selected .ifc-slot__tag { color: var(--ifc-primary); font-weight: 700; }

/* Admin: müsait slotlar da CHECKBOX ile seçilir (ardışık aralık → yeni rezervasyon).
   Dolu slotlar tıklanınca eskisi gibi sağ panelde açılır (is-selected: koyu). */
.ifc-admin-res .ifc-slot { justify-content: flex-start; gap: 10px; }
.ifc-admin-res .ifc-slot__time { flex: 1; }
.ifc-admin-res .ifc-slot.is-picked {
	background: rgba(30, 115, 190, 0.10);
	color: #1f2937;
	border-color: var(--ifc-primary);
	box-shadow: inset 0 0 0 1px var(--ifc-primary);
}
.ifc-admin-res .ifc-slot.is-picked .ifc-slot__box { border-color: var(--ifc-primary); background: var(--ifc-primary); }
.ifc-admin-res .ifc-slot.is-picked .ifc-slot__box::after { content: '✓'; color: #fff; font-size: 14px; font-weight: 900; line-height: 1; }
.ifc-pickbar:not(:empty) { margin-top: 10px; }

/* Özet */
.ifc-summary { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px 16px; margin: 0 0 16px; }
.ifc-summary__row { display: flex; justify-content: space-between; padding: 5px 0; }
.ifc-summary__k { color: #6b7280; }
.ifc-summary__v.is-strong { font-weight: 700; font-size: 17px; color: var(--ifc-primary); }

/* Form */
.ifc-form { max-width: 460px; }
.ifc-field { display: block; margin: 0 0 12px; }
.ifc-field__label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 4px; }

.ifc-input {
	width: 100%;
	font: inherit;
	padding: 9px 11px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	box-sizing: border-box;
}

.ifc-check { display: block; margin: 12px 0 16px; font-size: 14px; }

/* Ödeme yöntemi seçimi */
.ifc-paymethods { margin: 4px 0 16px; }
.ifc-paymethod {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 8px;
	padding: 12px 14px;
	border: 1px solid #d9dce1;
	border-radius: 10px;
	cursor: pointer;
	transition: border-color .15s, background .15s;
}
.ifc-paymethod.is-selected {
	border-color: var(--ifc-primary, #1e73be);
	background: rgba(30, 115, 190, 0.06);
}
.ifc-paymethod__label { font-weight: 600; }
.ifc-badge {
	margin-left: auto;
	background: #16a34a;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	border-radius: 999px;
	padding: 2px 10px;
	white-space: nowrap;
}
.ifc-bankinfo {
	margin-top: 12px;
	padding: 14px 16px;
	background: #f6f8fb;
	border: 1px dashed #c7d2e0;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.6;
	white-space: pre-line;
}

/* İndirim kodu */
.ifc-coupon { margin: 0 0 16px; }
.ifc-coupon__row { display: flex; gap: 8px; margin-top: 4px; }
.ifc-coupon__row .ifc-input { flex: 1; }

.ifc-msg { margin: 6px 0 12px; font-size: 14px; }
.ifc-msg--error { color: #b91c1c; }
.ifc-msg--info { color: #1f5fae; }

/* Butonlar */
.ifc-btn {
	background: var(--ifc-primary);
	color: var(--ifc-on-primary);
	border: none;
	padding: 11px 24px;
	border-radius: 6px;
	font: inherit;
	cursor: pointer;
}
.ifc-btn:hover { filter: brightness(0.93); }
.ifc-btn:disabled { opacity: 0.6; cursor: default; }

.ifc-policy { font-size: 13px; color: #666; margin: 18px 0 0; }

/* Başarı ekranı */
.ifc-success { text-align: center; border: 1px solid #e2e8f0; border-radius: 12px; padding: 28px 20px; background: #fff; }
.ifc-success__check { width: 56px; height: 56px; line-height: 56px; margin: 0 auto 12px; border-radius: 50%; background: var(--ifc-available); color: #fff; font-size: 30px; }
.ifc-success__title { margin: 0 0 4px; }
.ifc-success__sub { color: #6b7280; margin: 0 0 8px; }

.ifc-pnr {
	display: inline-block;
	font-size: 28px;
	font-weight: 800;
	letter-spacing: 4px;
	padding: 10px 22px;
	border: 2px dashed var(--ifc-primary);
	border-radius: 8px;
	color: var(--ifc-primary);
	margin: 0 0 16px;
}

.ifc-success__meta { max-width: 360px; margin: 0 auto 12px; text-align: left; }

.ifc-cal-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 4px 0 14px; }
.ifc-cal-links__label { font-size: 13px; color: #6b7280; }
.ifc-cal-links a { text-decoration: none; }

/* PNR sorgulama */
.ifc-pnr-form { max-width: 420px; }
.ifc-pnr-result { margin-top: 18px; }

/* Admin Rezervasyonlar SPA (booking bileşenlerini wp-admin'de yeniden kullanır) */
.ifc-admin-res {
	--ifc-primary: #1e73be;
	--ifc-on-primary: #ffffff;
	--ifc-available: #46b450;
	--ifc-booked: #dc3232;
	--ifc-closed: #dcdcde;
	max-width: 1180px;
	font-size: 14px;
	line-height: 1.5;
	color: #1f2937;
}

.ifc-admin-res .ifc-form-col {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 16px;
	align-self: flex-start;
	position: sticky;
	top: 40px;
}

.ifc-admin-res .ifc-slot--booked { cursor: pointer; }
.ifc-admin-res .ifc-slot--booked:hover { filter: brightness(0.97); }

/* Eğitmen ataması bekleyen uçuş (ödeme alındı) */
.ifc-slot--awaiting {
	background: rgba(245, 158, 11, 0.18) !important;
	border-color: rgba(245, 158, 11, 0.6) !important;
	color: #92400e !important;
}
.ifc-slot--awaiting .ifc-slot__tag { color: #b45309; font-weight: 600; }

/* Admin: dolu slot durum renkleri (rezervasyon durumuna göre) */
.ifc-admin-res .ifc-slot--st-pending { background: rgba(245, 158, 11, 0.16); border-color: rgba(245, 158, 11, 0.55); color: #92400e; }
.ifc-admin-res .ifc-slot--st-pending .ifc-slot__tag { color: #b45309; font-weight: 600; }
.ifc-admin-res .ifc-slot--st-awaiting_instructor { background: rgba(249, 115, 22, 0.16); border-color: rgba(249, 115, 22, 0.55); color: #7c2d12; }
.ifc-admin-res .ifc-slot--st-awaiting_instructor .ifc-slot__tag { color: #c2410c; font-weight: 600; }
.ifc-admin-res .ifc-slot--st-confirmed { background: rgba(30, 64, 175, 0.14); border-color: rgba(30, 64, 175, 0.5); color: #1e3a8a; }
.ifc-admin-res .ifc-slot--st-confirmed .ifc-slot__tag { color: #1e40af; font-weight: 600; }
.ifc-admin-res .ifc-slot--st-completed { background: rgba(22, 163, 74, 0.14); border-color: rgba(22, 163, 74, 0.5); color: #14532d; }
.ifc-admin-res .ifc-slot--st-completed .ifc-slot__tag { color: #15803d; font-weight: 600; }
.ifc-admin-res .ifc-slot--st-no_show { background: rgba(220, 38, 38, 0.14); border-color: rgba(220, 38, 38, 0.5); color: #7f1d1d; }
.ifc-admin-res .ifc-slot--st-no_show .ifc-slot__tag { color: #b91c1c; font-weight: 600; }
.ifc-admin-res .ifc-slot--st-cancelled { background: #f1f2f4; border-color: #d6d9de; color: #9aa1ab; text-decoration: line-through; }

/* Admin: takvim renk lejantı */
.ifc-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 12px 2px 0; font-size: 12px; color: #4b5563; }
.ifc-legend__title { font-weight: 600; }
.ifc-legend__item { display: inline-flex; align-items: center; gap: 6px; }
.ifc-legend__dot { width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(0,0,0,0.12); display: inline-block; }
.ifc-legend__dot.ifc-cell--attention { background: rgba(245, 158, 11, 0.4); }
.ifc-legend__dot.ifc-cell--instructor { background: rgba(249, 115, 22, 0.4); }
.ifc-legend__dot.ifc-cell--ready { background: rgba(30, 64, 175, 0.32); }
.ifc-legend__dot.ifc-cell--past { background: #e2e4e8; }

/* Mobil */
@media ( max-width: 640px ) {
	.ifc-cell { height: 54px; }
	.ifc-cell__meta { font-size: 10px; }
	.ifc-cal-title { font-size: 18px; }

	/* Slotları parmakla seçmesi kolay olsun: daha büyük dokunma alanı + boşluk. */
	.ifc-grid { gap: 8px; }
	.ifc-slot { padding: 14px 14px; font-size: 15px; }
	.ifc-slot__tag { font-size: 12px; }
	/* Slot listesinin başlığı/ipucu daha görünür. */
	.ifc-slotrow { padding: 12px 8px; }
}
