/* ==========================================================================
   Moscato Üyelik — giriş / kayıt modalı
   ========================================================================== */

.mu-modal {
	--mu-accent:      #17789f;
	--mu-accent-dark: #115f7e;
	--mu-accent-soft: rgba(23, 120, 159, .08);
	--mu-ink:         #16232b;
	--mu-muted:       #6b7a85;
	--mu-line:        #e2e8ec;
	--mu-surface:     #fff;
	--mu-tint:        #f6f8f9;
	--mu-err:         #d63638;
	--mu-ok:          #00893f;
	--mu-r:           18px;
	--mu-r-sm:        11px;

	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: inherit;
	-webkit-font-smoothing: antialiased;
}

.mu-modal[hidden] { display: none; }

.mu-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(12, 24, 32, .55);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity .25s ease;
}

.mu-modal.is-open .mu-modal__backdrop { opacity: 1; }


/* --------------------------------------------------------------------------
   Panel
   -------------------------------------------------------------------------- */

.mu-modal__sheet {
	position: relative;
	width: 100%;
	max-width: 440px;
	max-height: calc(100vh - 48px);
	background: var(--mu-surface);
	border-radius: var(--mu-r);
	box-shadow: 0 24px 64px rgba(12, 24, 32, .28);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform: translateY(16px) scale(.98);
	opacity: 0;
	transition: transform .28s cubic-bezier(.2, .8, .3, 1), opacity .22s ease;
}

.mu-modal.is-open .mu-modal__sheet {
	transform: translateY(0) scale(1);
	opacity: 1;
}

.mu-modal__grip { display: none; }

.mu-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 3;
	width: 34px;
	height: 34px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: rgba(22, 35, 43, .06);
	color: var(--mu-muted);
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}

.mu-modal__close:hover { background: rgba(22, 35, 43, .12); color: var(--mu-ink); }
.mu-modal__close svg { width: 17px; height: 17px; }

.mu-modal__body {
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	padding: 4px 28px 28px;
}


/* --------------------------------------------------------------------------
   Sekmeler
   -------------------------------------------------------------------------- */

.mu-tabs {
	position: relative;
	display: flex;
	gap: 4px;
	padding: 18px 28px 0;
	border-bottom: 1px solid var(--mu-line);
	flex: 0 0 auto;
}

.mu-tab {
	flex: 1 1 0;
	appearance: none;
	border: 0;
	background: transparent;
	padding: 12px 8px 14px;
	font-size: 15px;
	font-weight: 500;
	font-family: inherit;
	color: var(--mu-muted);
	cursor: pointer;
	transition: color .18s ease;
}

.mu-tab.is-active { color: var(--mu-accent); font-weight: 600; }

.mu-tabs__ind {
	position: absolute;
	bottom: -1px;
	left: 28px;
	height: 2px;
	width: 0;
	background: var(--mu-accent);
	border-radius: 2px 2px 0 0;
	transition: transform .28s cubic-bezier(.2, .8, .3, 1), width .28s cubic-bezier(.2, .8, .3, 1);
}

/* OTP ve profil adımlarında sekmeler gizlenir */
.mu-modal[data-state="otp"] .mu-tabs,
.mu-modal[data-state="profil"] .mu-tabs { display: none; }


/* --------------------------------------------------------------------------
   Paneller
   -------------------------------------------------------------------------- */

.mu-panel { display: none; padding-top: 22px; }
.mu-panel.is-active { display: block; animation: mu-in .3s ease; }

@keyframes mu-in {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: none; }
}

.mu-h {
	margin: 0 0 6px;
	font-size: 21px;
	line-height: 1.25;
	font-weight: 600;
	color: var(--mu-ink);
}

.mu-sub {
	margin: 0 0 20px;
	font-size: 14.5px;
	line-height: 1.5;
	color: var(--mu-muted);
}

.mu-sub strong { color: var(--mu-ink); word-break: break-all; }


/* --------------------------------------------------------------------------
   Adım göstergesi
   -------------------------------------------------------------------------- */

.mu-steps {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 18px;
}

.mu-step {
	width: 26px;
	height: 26px;
	flex: 0 0 26px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12.5px;
	font-weight: 700;
	background: var(--mu-tint);
	border: 1px solid var(--mu-line);
	color: var(--mu-muted);
}

.mu-step.is-active {
	background: var(--mu-accent);
	border-color: var(--mu-accent);
	color: #fff;
}

.mu-step.is-done {
	background: var(--mu-ok);
	border-color: var(--mu-ok);
	color: #fff;
}

.mu-step__line {
	flex: 1 1 auto;
	height: 2px;
	background: var(--mu-line);
	border-radius: 2px;
}

.mu-step__line.is-done { background: var(--mu-ok); }


/* --------------------------------------------------------------------------
   Form alanları
   -------------------------------------------------------------------------- */

.mu-form { display: block; }

.mu-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
}

.mu-field {
	display: block;
	margin-bottom: 15px;
}

.mu-field__label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--mu-ink);
}

.mu-opt {
	font-weight: 400;
	font-style: normal;
	color: var(--mu-muted);
	font-size: 12px;
}

.mu-modal input[type="text"],
.mu-modal input[type="email"],
.mu-modal input[type="tel"],
.mu-modal input[type="password"],
.mu-modal select {
	width: 100%;
	box-sizing: border-box;
	height: 46px;
	padding: 0 14px;
	font-size: 16px; /* 16px altı iOS'ta sayfayı zoomlar */
	font-family: inherit;
	color: var(--mu-ink);
	background: var(--mu-surface);
	border: 1px solid var(--mu-line);
	border-radius: var(--mu-r-sm);
	outline: none;
	transition: border-color .15s ease, box-shadow .15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.mu-modal select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7a85' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 18px;
	padding-right: 38px;
}

.mu-modal input:focus,
.mu-modal select:focus {
	border-color: var(--mu-accent);
	box-shadow: 0 0 0 3px var(--mu-accent-soft);
}

.mu-field.has-error input,
.mu-field.has-error select { border-color: var(--mu-err); }

.mu-field__pass { position: relative; display: block; }

.mu-field__pass input { padding-right: 46px; }

.mu-eye {
	position: absolute;
	top: 50%;
	right: 6px;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	border: 0;
	background: transparent;
	cursor: pointer;
	padding: 0;
	border-radius: 8px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7a85' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 20px;
}

.mu-eye.is-on {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317789f' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3l18 18'/%3E%3Cpath d='M10.6 10.6a3 3 0 004.2 4.2'/%3E%3Cpath d='M9.4 5.2A9.6 9.6 0 0112 5c6.4 0 10 7 10 7a17 17 0 01-3.2 4.1M6.2 6.7A17 17 0 002 12s3.6 7 10 7a9.7 9.7 0 003.4-.6'/%3E%3C/svg%3E");
}

.mu-grid2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 12px;
}

.mu-hint,
.mu-err {
	display: block;
	font-style: normal;
	font-size: 12.5px;
	margin-top: 5px;
	line-height: 1.4;
}

.mu-hint { color: var(--mu-muted); }
.mu-err  { color: var(--mu-err); display: none; }
.mu-err.is-on { display: block; }


/* --------------------------------------------------------------------------
   Onay kutuları
   -------------------------------------------------------------------------- */

.mu-consents {
	margin: 18px 0 20px;
	padding: 14px 16px;
	background: var(--mu-tint);
	border: 1px solid var(--mu-line);
	border-radius: var(--mu-r-sm);
}

.mu-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--mu-ink);
	cursor: pointer;
	margin-bottom: 12px;
}

.mu-consents .mu-check:last-of-type { margin-bottom: 0; }

.mu-check input[type="checkbox"] {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	margin: 1px 0 0;
	accent-color: var(--mu-accent);
	cursor: pointer;
}

.mu-check a { color: var(--mu-accent); text-decoration: underline; }
.mu-check a:hover { color: var(--mu-accent-dark); }
.mu-check em { font-style: normal; color: var(--mu-muted); }

.mu-check--inline { margin-bottom: 0; font-size: 13.5px; }

.mu-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 4px 0 18px;
	flex-wrap: wrap;
}

.mu-link {
	appearance: none;
	border: 0;
	background: none;
	padding: 0;
	font-family: inherit;
	font-size: 13.5px;
	color: var(--mu-accent);
	text-decoration: none;
	cursor: pointer;
}

.mu-link:hover { color: var(--mu-accent-dark); text-decoration: underline; }


/* --------------------------------------------------------------------------
   OTP kutuları
   -------------------------------------------------------------------------- */

.mu-otp {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 8px;
	margin-bottom: 18px;
}

.mu-modal .mu-otp input {
	height: 56px;
	padding: 0;
	text-align: center;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: 0;
	color: var(--mu-ink);
	border-radius: var(--mu-r-sm);
}

.mu-otp.has-error input { border-color: var(--mu-err); }

.mu-otp.has-error { animation: mu-shake .32s ease; }

@keyframes mu-shake {
	0%, 100% { transform: translateX(0); }
	25%      { transform: translateX(-5px); }
	75%      { transform: translateX(5px); }
}

.mu-resend {
	margin: 14px 0 0;
	text-align: center;
	font-size: 13.5px;
	color: var(--mu-muted);
}

.mu-resend__timer { color: var(--mu-muted); }
.mu-link[disabled] { color: var(--mu-muted); cursor: default; text-decoration: none; }


/* --------------------------------------------------------------------------
   Butonlar
   -------------------------------------------------------------------------- */

.mu-btn {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 48px;
	padding: 0 20px;
	border: 1px solid transparent;
	border-radius: 999px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background .16s ease, border-color .16s ease, transform .1s ease;
}

.mu-btn:active { transform: scale(.985); }

.mu-btn--primary {
	background: var(--mu-accent);
	color: #fff;
	box-shadow: 0 6px 18px rgba(23, 120, 159, .26);
}

.mu-btn--primary:hover { background: var(--mu-accent-dark); }

.mu-btn--ghost {
	background: transparent;
	color: var(--mu-muted);
	box-shadow: none;
	margin-top: 8px;
	min-height: 42px;
	font-weight: 500;
}

.mu-btn--ghost:hover { color: var(--mu-ink); background: var(--mu-tint); }

.mu-btn[disabled] { opacity: .6; cursor: default; }
.mu-btn[disabled]:active { transform: none; }

.mu-spin {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, .4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: mu-rot .7s linear infinite;
}

.mu-btn.is-loading .mu-spin { display: block; }
.mu-btn.is-loading { pointer-events: none; opacity: .85; }

@keyframes mu-rot { to { transform: rotate(360deg); } }


/* --------------------------------------------------------------------------
   Uyarı kutusu
   -------------------------------------------------------------------------- */

.mu-alert {
	margin: 0 0 16px;
	padding: 11px 14px;
	border-radius: var(--mu-r-sm);
	font-size: 13.5px;
	line-height: 1.5;
	background: #fdecec;
	color: #9a1d1e;
	border: 1px solid #f5cfd0;
}

.mu-alert.is-ok {
	background: #e8f6ee;
	color: #0a6b36;
	border-color: #c5e6d3;
}

.mu-alert[hidden] { display: none; }


/* --------------------------------------------------------------------------
   Sosyal giriş yeri
   -------------------------------------------------------------------------- */

.mu-or {
	position: relative;
	text-align: center;
	margin: 22px 0 16px;
}

.mu-or::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	height: 1px;
	background: var(--mu-line);
}

.mu-or span {
	position: relative;
	padding: 0 12px;
	background: var(--mu-surface);
	font-size: 12.5px;
	color: var(--mu-muted);
}


/* --------------------------------------------------------------------------
   Google ile Giriş butonu
   -------------------------------------------------------------------------- */

.mu-google-wrap {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 44px;
	margin-bottom: 6px;
}

/* GSI iframe'ini tam genişliğe yay */
.mu-google-wrap > div,
.mu-google-wrap iframe {
	width: 100% !important;
	max-width: 100% !important;
}

/* GSI kendi butonunu render edene kadar boş alan görünmesin */
.mu-google-wrap:empty { display: none; }


/* --------------------------------------------------------------------------
   Mobil — alttan açılan sheet
   -------------------------------------------------------------------------- */

@media (max-width: 600px) {

	.mu-modal { align-items: flex-end; }

	.mu-modal__sheet {
		max-width: none;
		max-height: 92vh;
		max-height: 92dvh;
		border-radius: 22px 22px 0 0;
		transform: translateY(100%);
		transition: transform .32s cubic-bezier(.2, .8, .3, 1);
		opacity: 1;
	}

	.mu-modal.is-open .mu-modal__sheet { transform: translateY(0); }

	.mu-modal.is-dragging .mu-modal__sheet { transition: none; }

	.mu-modal__grip {
		display: block;
		width: 38px;
		height: 4px;
		margin: 9px auto 0;
		border-radius: 99px;
		background: #d5dde2;
		flex: 0 0 auto;
	}

	.mu-modal__close { top: 14px; right: 14px; }

	.mu-tabs { padding: 10px 20px 0; }
	.mu-tabs__ind { left: 20px; }
	.mu-modal__body { padding: 4px 20px 28px; padding-bottom: calc(28px + env(safe-area-inset-bottom)); }

	.mu-h { font-size: 19px; }
	.mu-grid2 { grid-template-columns: 1fr; }
	.mu-otp { gap: 6px; }
	.mu-modal .mu-otp input { height: 50px; font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
	.mu-modal *,
	.mu-modal__sheet,
	.mu-modal__backdrop { transition: none !important; animation: none !important; }
}
