/**
 * GAPAS Member — onay penceresi ve bildirimler.
 *
 * SweetAlert benzeri davranış, dış bağımlılık olmadan.
 * Hem yönetim panelinde hem ön yüzde kullanılır, o yüzden hiçbir
 * WordPress sınıfına dayanmaz.
 */

.gapas-modal-perde {
	/*
	 * Tasarım tokenları burada da tanımlanır: modal document.body'ye eklenir,
	 * yani .gapas-wrap / .gapas-frontend DIŞINDA kalır. Bunlar olmadan modal
	 * içindeki var(--g-*) kullanan bileşenler (koltuk grid'i, alt pencere)
	 * renksiz/şeffaf kalır.
	 */
	--g-zemin:       #ffffff;
	--g-yuzey:       #fbfaf7;
	--g-cizgi:       #e3dfd5;
	--g-cizgi-acik:  #efece5;
	--g-metin:       #1c1a16;
	--g-metin-soft:  #55504a;
	--g-soluk:       #756e60;
	--g-vurgu:       #8a6710;
	--g-vurgu-zemin: #f7f0dd;
	--g-iyi:         #2a6a2a;
	--g-iyi-zemin:   #eaf3e8;
	--g-uyari:       #8a6100;
	--g-uyari-zemin: #fbf2dc;
	--g-kritik:      #96341f;
	--g-kritik-zemin:#f9e9e4;
	--g-r:   6px;
	--g-r-s: 4px;
	--g-golge: 0 1px 2px rgba(28,26,22,.06), 0 6px 18px -10px rgba(28,26,22,.16);

	position: fixed;
	inset: 0;
	z-index: 160000;
	background: rgba(24, 22, 18, .55);
	backdrop-filter: blur(2px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	animation: gapas-belir .16s ease;
}
.gapas-modal-perde.g-kapaniyor { animation: gapas-solu .14s ease forwards; }

.gapas-modal {
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 20px 60px -12px rgba(0, 0, 0, .4);
	width: 100%;
	max-width: 420px;
	padding: 26px 26px 20px;
	text-align: center;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: #1c1a16;
	animation: gapas-yukari .2s cubic-bezier(.2, .9, .3, 1.2);
}
.gapas-modal.g-kapaniyor { animation: gapas-asagi .14s ease forwards; }

.gapas-modal__simge {
	width: 56px;
	height: 56px;
	margin: 0 auto 14px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: #f2f0ea;
	color: #756e60;
}
.gapas-modal__simge svg { width: 30px; height: 30px; }
.gapas-modal__simge.g-uyari  { background: #fbf2dc; color: #8a6100; }
.gapas-modal__simge.g-kritik { background: #f9e9e4; color: #96341f; }
.gapas-modal__simge.g-iyi    { background: #eaf3e8; color: #2a6a2a; }
.gapas-modal__simge.g-soru   { background: #f7f0dd; color: #8a6710; }

.gapas-modal__baslik {
	margin: 0 0 8px;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.3;
}
.gapas-modal__metin {
	margin: 0 0 20px;
	font-size: 14px;
	line-height: 1.6;
	color: #55504a;
}

.gapas-modal__dugmeler {
	display: flex;
	gap: 8px;
	justify-content: center;
	flex-wrap: wrap;
}

.gapas-dugme {
	appearance: none;
	border: 1px solid transparent;
	border-radius: 6px;
	padding: 9px 20px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
	line-height: 1.5;
	transition: background-color .12s ease, border-color .12s ease;
}
.gapas-dugme:focus-visible { outline: 2px solid #8a6710; outline-offset: 2px; }

.gapas-dugme.g-birincil { background: #8a6710; color: #fff; }
.gapas-dugme.g-birincil:hover { background: #6f520c; }

.gapas-dugme.g-ikincil { background: #fff; color: #55504a; border-color: #d7d2c7; }
.gapas-dugme.g-ikincil:hover { background: #f5f3ee; }

.gapas-dugme.g-yikici { background: #96341f; color: #fff; }
.gapas-dugme.g-yikici:hover { background: #7c2917; }

body.gapas-modal-acik { overflow: hidden; }

/* ------------------------------------------------- Geniş içerik penceresi */

.gapas-modal--genis {
	max-width: 720px;
	padding: 0;
	text-align: left;
	max-height: calc(100vh - 60px);
	display: flex;
	flex-direction: column;
}

.gapas-modal__ust {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	border-bottom: 1px solid #e3dfd5;
	background: #fbfaf7;
	border-radius: 10px 10px 0 0;
	flex: 0 0 auto;
}
.gapas-modal__ust .gapas-modal__baslik { margin: 0; font-size: 16px; }

.gapas-modal__kapat {
	appearance: none;
	background: none;
	border: 0;
	font-size: 24px;
	line-height: 1;
	color: #918a7c;
	cursor: pointer;
	padding: 0 4px;
	border-radius: 4px;
}
.gapas-modal__kapat:hover { color: #1c1a16; background: #efece5; }
.gapas-modal__kapat:focus-visible { outline: 2px solid #8a6710; outline-offset: 1px; }

.gapas-modal__govde {
	padding: 20px;
	overflow-y: auto;
	flex: 1 1 auto;
}

/* Yükleniyor göstergesi */
.gapas-yukleniyor {
	display: flex;
	gap: 6px;
	justify-content: center;
	padding: 34px 0;
}
.gapas-yukleniyor span {
	width: 8px; height: 8px;
	border-radius: 50%;
	background: #c9c2b4;
	animation: gapas-zipla 1s ease-in-out infinite;
}
.gapas-yukleniyor span:nth-child(2) { animation-delay: .15s; }
.gapas-yukleniyor span:nth-child(3) { animation-delay: .3s; }
@keyframes gapas-zipla {
	0%, 80%, 100% { transform: translateY(0); opacity: .5; }
	40%           { transform: translateY(-6px); opacity: 1; }
}

/* Pencere içi form */
.gapas-form-satir {
	display: grid;
	grid-template-columns: 170px 1fr;
	gap: 10px 14px;
	align-items: start;
	padding: 9px 0;
	border-bottom: 1px solid #efece5;
}
.gapas-form-satir:last-of-type { border-bottom: 0; }
.gapas-form-satir > label {
	font-size: 13px;
	font-weight: 600;
	color: #55504a;
	padding-top: 6px;
}
.gapas-form-satir input[type="text"],
.gapas-form-satir input[type="email"],
.gapas-form-satir input[type="tel"],
.gapas-form-satir input[type="url"],
.gapas-form-satir input[type="date"],
.gapas-form-satir select,
.gapas-form-satir textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}
.gapas-form-satir .gapas-ipucu-metin {
	font-size: 12px;
	color: #756e60;
	margin-top: 4px;
}
.gapas-form-satir .gapas-salt-okunur {
	font-size: 13px;
	color: #1c1a16;
	padding-top: 6px;
}

.gapas-modal__alt {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	padding: 14px 20px;
	border-top: 1px solid #e3dfd5;
	background: #fbfaf7;
	border-radius: 0 0 10px 10px;
	flex: 0 0 auto;
}

.gapas-hata-kutusu {
	background: #f9e9e4;
	border-left: 3px solid #96341f;
	color: #96341f;
	padding: 10px 12px;
	border-radius: 0 4px 4px 0;
	font-size: 13px;
	margin-bottom: 14px;
}
.gapas-hata-kutusu ul { margin: 6px 0 0; padding-left: 18px; }

@media screen and (max-width: 700px) {
	.gapas-form-satir { grid-template-columns: 1fr; gap: 4px; }
	.gapas-form-satir > label { padding-top: 0; }
	.gapas-modal--genis { max-height: calc(100vh - 24px); }
}

/* ------------------------------------------------------------ Bildirimler */

.gapas-bildirimler {
	position: fixed;
	right: 18px;
	bottom: 18px;
	/* Alt pencerenin (koltuk ekleme, 160010) de ÜSTÜNDE: uyarı toast'ları
	 * her zaman en önde görünsün, arkada kalıp kaybolmasın. */
	z-index: 160030;
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-width: 380px;
}

.gapas-bildirim {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #fff;
	border: 1px solid #e3dfd5;
	border-left-width: 3px;
	border-radius: 8px;
	padding: 11px 12px;
	box-shadow: 0 8px 26px -10px rgba(0, 0, 0, .32);
	font-size: 13px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: #1c1a16;
	animation: gapas-kaydir .2s cubic-bezier(.2, .9, .3, 1.1);
}
.gapas-bildirim.g-kapaniyor { animation: gapas-kaydir-cik .2s ease forwards; }

.gapas-bildirim.g-iyi    { border-left-color: #2a6a2a; }
.gapas-bildirim.g-uyari  { border-left-color: #8a6100; }
.gapas-bildirim.g-kritik { border-left-color: #96341f; }

.gapas-bildirim .gapas-modal__simge {
	width: 26px;
	height: 26px;
	margin: 0;
	flex: 0 0 auto;
}
.gapas-bildirim .gapas-modal__simge svg { width: 16px; height: 16px; }

.gapas-bildirim__metin { flex: 1 1 auto; line-height: 1.45; }

.gapas-bildirim__kapat {
	appearance: none;
	background: none;
	border: 0;
	font-size: 18px;
	line-height: 1;
	color: #918a7c;
	cursor: pointer;
	padding: 0 2px;
}
.gapas-bildirim__kapat:hover { color: #1c1a16; }

/* ------------------------------------------------------------ Animasyonlar */

@keyframes gapas-belir   { from { opacity: 0; } to { opacity: 1; } }
@keyframes gapas-solu    { to   { opacity: 0; } }
@keyframes gapas-yukari  { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes gapas-asagi   { to   { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes gapas-kaydir  { from { opacity: 0; transform: translateX(18px); } }
@keyframes gapas-kaydir-cik { to { opacity: 0; transform: translateX(18px); } }

@media (prefers-reduced-motion: reduce) {
	.gapas-modal-perde,
	.gapas-modal,
	.gapas-bildirim { animation: none !important; }
}

@media screen and (max-width: 600px) {
	.gapas-bildirimler { left: 12px; right: 12px; bottom: 12px; max-width: none; }
	.gapas-modal { padding: 22px 18px 16px; }
	.gapas-modal__dugmeler .gapas-dugme { flex: 1 1 40%; }
}
