/* ============================================
   CONTACT POPUP - contact-popup.css
   Prefix: cpop__ (çakışma önleme)
   ============================================ */

.cpop__trigger {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

/* --- Ana buton --- */
.cpop__main-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #223645, #223645);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(108,99,255,0.45);
  transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
  outline: none;
  position: relative;
}

.cpop__main-btn::before,
.cpop__main-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(108,99,255,0.35);
  animation: cpopPulse 2.2s ease-out infinite;
  pointer-events: none;
}
.cpop__main-btn::after { animation-delay: 1.1s; }

.cpop__main-btn.cpop--open::before,
.cpop__main-btn.cpop--open::after { animation: none; opacity: 0; }

@keyframes cpopPulse {
  0%   { transform: scale(1);   opacity: 0.7; }
  70%  { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}

.cpop__main-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(108,99,255,0.55);
}

.cpop__main-btn svg {
  width: 24px;
  height: 24px;
  fill: #fff;
  transition: transform 0.35s cubic-bezier(.34,1.56,.64,1);
  position: relative;
  z-index: 1;
}

.cpop__main-btn.cpop--open {
  background: linear-gradient(135deg, #d1901c, #d1901c);
  box-shadow: 0 4px 18px rgba(255,107,107,0.4);
}
.cpop__main-btn.cpop--open svg { transform: rotate(45deg) scale(1.1); }

/* --- İkon listesi ---
   overflow: visible! Kesilme olmasın.
   Gizlemek için opacity + pointer-events kullan, overflow değil. */
.cpop__items {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  /* overflow: hidden KALDIRILDI */
  opacity: 0;
  pointer-events: none;
  max-height: 0;
  transition: opacity 0.28s, max-height 0.38s cubic-bezier(.4,0,.2,1);
}

.cpop__items.cpop--visible {
  opacity: 1;
  pointer-events: all;
  max-height: 600px;
}

.cpop__items.cpop--visible .cpop__item:nth-child(1) { animation: cpopItemIn 0.22s 0.02s both; }
.cpop__items.cpop--visible .cpop__item:nth-child(2) { animation: cpopItemIn 0.22s 0.07s both; }
.cpop__items.cpop--visible .cpop__item:nth-child(3) { animation: cpopItemIn 0.22s 0.12s both; }
.cpop__items.cpop--visible .cpop__item:nth-child(4) { animation: cpopItemIn 0.22s 0.17s both; }
.cpop__items.cpop--visible .cpop__item:nth-child(5) { animation: cpopItemIn 0.22s 0.22s both; }
.cpop__items.cpop--visible .cpop__item:nth-child(6) { animation: cpopItemIn 0.22s 0.27s both; }

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

.cpop__item {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-direction: row;
  cursor: pointer;
  text-decoration: none;
  /* Her item kendi overflow'unu görmeli */
  overflow: visible;
}

.cpop__icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
  transition: transform 0.18s cubic-bezier(.34,1.56,.64,1), box-shadow 0.18s;
  flex-shrink: 0;
  /* Hover'da scale taşmasın diye */
  overflow: visible;
}

.cpop__icon-btn:hover,
.cpop__item:hover .cpop__icon-btn {
  transform: scale(1.18);
  box-shadow: 0 4px 18px rgba(0,0,0,0.28);
}

.cpop__icon-btn svg { width: 20px; height: 20px; }

.cpop__icon-btn--instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.cpop__icon-btn--facebook  { background: #1877F2; }
.cpop__icon-btn--youtube   { background: #FF0000; }
.cpop__icon-btn--phone     { background: #25D366; }
.cpop__icon-btn--whatsapp  { background: #25D366; }
.cpop__icon-btn--mail      { background: #EA4335; }

/* Label sağa açılır */
.cpop__label {
  background: rgba(20,20,20,0.85);
  color: #fff;
  font-size: 12px;
  font-family: sans-serif;
  padding: 5px 12px;
  border-radius: 20px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.18s, transform 0.18s;
}

.cpop__item:hover .cpop__label {
  opacity: 1;
  transform: translateX(0);
}

/* --- Mail item wrapper --- */
.cpop__item--mail { position: relative; }

/* --- Mail formu ---
   position: fixed → her zaman görünür, hiçbir parent tarafından kesilemez */
.cpop__mail-form-wrap {
  position: fixed;
  bottom: 28px;
  left: 100px;       /* trigger(28) + ikon(44) + gap(~28) */
  width: 290px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.20);
  padding: 20px 18px 16px;
  /* Başlangıçta gizli */
  opacity: 0;
  pointer-events: none;
  transform: translateX(-10px) scale(0.97);
  transition: opacity 0.22s, transform 0.22s cubic-bezier(.34,1.4,.64,1);
  z-index: 10000;
  font-family: sans-serif;
}

/* Hover ile açılır */
.cpop__mail-form-wrap.cpop--form-visible {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0) scale(1);
}

.cpop__mail-form-wrap h4 {
  margin: 0 0 13px;
  font-size: 14px;
  font-weight: 700;
  color: #222;
}

.cpop__mail-form-wrap input,
.cpop__mail-form-wrap textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid #e8e8e8;
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 13px;
  color: #222;
  margin-bottom: 8px;
  outline: none;
  resize: none;
  font-family: sans-serif;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fafafa;
}

.cpop__mail-form-wrap input:focus,
.cpop__mail-form-wrap textarea:focus {
  border-color: #6c63ff;
  box-shadow: 0 0 0 3px rgba(108,99,255,0.1);
  background: #fff;
}

.cpop__mail-form-wrap textarea { height: 72px; }

.cpop__mail-form-wrap button[type="submit"] {
  width: 100%;
  background: linear-gradient(135deg, #d1901c, #d1901c);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.18s, transform 0.15s;
}

.cpop__mail-form-wrap button[type="submit"]:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.cpop__close-form {
  position: absolute;
  top: 11px;
  right: 13px;
  background: none;
  border: none;
  font-size: 19px;
  cursor: pointer;
  color: #bbb;
  line-height: 1;
  padding: 0;
  transition: color 0.15s;
}
.cpop__close-form:hover { color: #444; }

.cpop__form-success {
  display: none;
  text-align: center;
  padding: 12px 0 6px;
  color: #25a244;
  font-size: 13px;
  font-weight: 600;
}

/* Mobil */
@media (max-width: 480px) {
  .cpop__trigger { bottom: 18px; left: 16px; }
  .cpop__mail-form-wrap {
    left: 16px;
    bottom: 90px;
    width: calc(100vw - 32px);
    max-width: 320px;
  }
}
