/* Paylasilan telefon alani stilleri: ulke kodu secici (.phone-cc*) + SMS kod
   kutulari (.otp-*) + telefon degistirme pop-up'i (.phone-modal*).
   phone-change-modal.js bu dosyayi bekler; kullanan sayfa <head>'inde linkler.
   NOT: info.css / club-info.css / phone-change.css halen kendi eski .phone-cc
   kopyalarini tasiyor - ileride buraya konsolide edilebilir. */

.phone-cc {
  position: relative;
  flex: 0 0 auto;
}
.phone-cc-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 100%;
  padding: 12px 12px;
  border: 1px solid #D3D3D3;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #161A1D;
  letter-spacing: 0.2px;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.phone-cc-toggle:hover { border-color: #a89fa0; }
.phone-cc-toggle:focus-visible {
  outline: none;
  border-color: #E5383B;
  box-shadow: 0 0 0 3px rgba(229, 56, 59, 0.18);
}
.phone-cc-flag { font-size: 19px; line-height: 1; }
.phone-cc-dial { color: #4a4344; }
.phone-cc-caret {
  width: 15px;
  height: 15px;
  color: #7a7374;
  transition: transform 0.2s ease;
}
.phone-cc.open .phone-cc-caret { transform: rotate(180deg); }
.phone-cc-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 60;
  width: 300px;
  max-width: 80vw;
  background: #ffffff;
  border: 1px solid #e4e1e1;
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.16);
  padding: 10px;
  display: none;
  flex-direction: column;
  transform-origin: top left;
  animation: phoneCcIn 0.16s ease;
  text-align: left;
}
.phone-cc.open .phone-cc-menu { display: flex; }
.phone-cc-search-wrap { padding: 2px 2px 8px; }
.phone-cc-search {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e4e1e1;
  border-radius: 11px;
  padding: 10px 13px;
  font-size: 14px;
  font-family: inherit;
  background: #F5F3F4;
  transition: border-color 0.18s, background 0.18s;
}
.phone-cc-search:focus {
  outline: none;
  border-color: #E5383B;
  background: #ffffff;
}
.phone-cc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 264px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.phone-cc-option {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.12s;
}
.phone-cc-option:hover { background: #F5F3F4; }
.phone-cc-option.selected { background: #fdf1f1; }
.phone-cc-opt-flag { font-size: 19px; line-height: 1; flex: 0 0 auto; }
.phone-cc-opt-name {
  flex: 1 1 auto;
  color: #161A1D;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.phone-cc-opt-dial { flex: 0 0 auto; color: #7a7374; font-weight: 600; }
.phone-cc-empty {
  padding: 16px;
  text-align: center;
  color: #a89fa0;
  font-size: 14px;
}
.phone-cc.disabled .phone-cc-toggle {
  background: #F5F3F4;
  color: #7a7374;
  cursor: not-allowed;
}

/* ── SMS kod kutulari ── */
.otp-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.otp-input {
  width: 44px;
  height: 54px;
  border: 1px solid #D3D3D3;
  border-radius: 10px;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  font-family: inherit;
  background: #ffffff;
  color: #161A1D;
}

.otp-input:focus {
  outline: 2px solid #f2abad;
  border-color: #E5383B;
}

/* ── Telefon degistirme pop-up'i ──────────────────────────────────────────
   Tasarim, phone-verify.html'deki kod pop-up'iyla ayni: ortali beyaz kart,
   telefon rozeti, numara seridi, kirmizi ana buton, sag ustte sade carpi.
   Fark: ayri bir sayfa degil, acan sayfanin (ör. hesabim) uzerinde durur. */
.phone-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 620;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(22, 18, 20, 0.55);
}

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

.phone-modal {
  position: relative;
  width: min(94vw, 420px);
  max-height: 92vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 20px;
  padding: 30px 26px;
  text-align: center;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.3);
  animation: phoneModalPop 0.2s ease;
}

@keyframes phoneModalPop {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.phone-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: none;
  font-size: 24px;
  line-height: 1;
  color: #a89fa0;
  cursor: pointer;
  padding: 6px;
}

.phone-modal-close:hover { color: #6b6465; }

.phone-modal-badge {
  width: 58px;
  height: 58px;
  margin: 4px auto 16px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #fce4e4, #f2abad);
  color: #E5383B;
}

.phone-modal-badge svg { width: 28px; height: 28px; }

.phone-modal h2 {
  font-size: clamp(18px, 2.2vw, 22px);
  margin-bottom: 8px;
  color: #161A1D;
}

.phone-modal-subtitle {
  color: #6b6465;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 12px;
}

/* Adima gore degisen numara seridi: once mevcut numara, kod adiminda kodun
   gonderildigi numara. */
.phone-modal-phone {
  font-size: 18px;
  font-weight: 700;
  color: #161A1D;
  background: #F5F3F4;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.phone-modal-step {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.phone-modal-field { text-align: left; }

.phone-modal-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #4a4344;
  margin-bottom: 7px;
}

.phone-modal-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.phone-modal input[type=tel],
.phone-modal input[type=email],
.phone-modal input[type=password] {
  width: 100%;
  border: 1px solid #D3D3D3;
  border-radius: 10px;
  padding: 12px 13px;
  font-size: 15px;
  font-family: inherit;
  background: #ffffff;
  color: #161A1D;
}

.phone-modal input[type=tel]:focus,
.phone-modal input[type=email]:focus,
.phone-modal input[type=password]:focus {
  outline: 2px solid #f2abad;
  border-color: #E5383B;
}

.phone-modal-primary {
  border: none;
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #E5383B, #BA181B);
  cursor: pointer;
  width: 100%;
  transition: transform 0.18s, opacity 0.18s;
}

.phone-modal-primary:hover:not(:disabled) { transform: translateY(-1px); }

.phone-modal-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.phone-modal-resend {
  border: none;
  border-radius: 12px;
  background: #F5F3F4;
  color: #6b6465;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 11px 16px;
  width: 100%;
  transition: background 0.15s;
}

.phone-modal-resend:hover:not(:disabled) { background: #e4e1e1; }

.phone-modal-resend:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.phone-modal-feedback {
  margin-top: 16px;
  font-size: 14px;
  border-radius: 10px;
  padding: 11px 12px;
  line-height: 1.5;
}

.phone-modal-feedback[hidden] { display: none; }
.phone-modal-feedback.error { background: #fce4e4; color: #660708; }
.phone-modal-feedback.success { background: #dcfce7; color: #166534; }

@media (max-width: 480px) {
  .phone-modal { padding: 22px 18px; }
  .otp-input { width: 38px; height: 48px; font-size: 19px; }
}
