/* ===================================================
   46HİZMET — Component Library
   =================================================== */

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--r-md);
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  transition: all var(--dur-base) var(--ease-smooth);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--dur-fast);
}
.btn:hover::before { background: rgba(255,255,255,0.08); }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-red);
}
.btn-primary:hover { background: var(--red-700); box-shadow: 0 6px 30px rgba(230,0,0,.35); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: var(--white); }

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

.btn-dark {
  background: var(--black-800);
  color: var(--white);
}
.btn-dark:hover { background: var(--black-900); }

.btn-lg { padding: var(--sp-4) var(--sp-8); font-size: var(--text-base); }
.btn-sm { padding: var(--sp-2) var(--sp-4); font-size: var(--text-xs); }
.btn-full { width: 100%; }
.btn-icon { padding: var(--sp-3); aspect-ratio: 1; }
.btn-rounded { border-radius: var(--r-full); }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: all var(--dur-base) var(--ease-smooth);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.card-body { padding: var(--sp-6); }
.card-sm .card-body { padding: var(--sp-4); }
.card-lg .card-body { padding: var(--sp-8); }

.card-elevated { box-shadow: var(--shadow-md); border-color: transparent; }
.card-red { border-left: 4px solid var(--primary); }
.card-glass {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.6);
}

/* ── Form Elements ── */
.form-group { display: flex; flex-direction: column; gap: var(--sp-2); }

.form-label {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.form-label span { color: var(--primary); margin-left: 2px; }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface);
  border: 1.5px solid var(--border-dark);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-size: var(--text-base);
  transition: all var(--dur-fast) var(--ease-smooth);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23707070' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: var(--sp-10);
}

.form-textarea { resize: vertical; min-height: 100px; }

.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(230,0,0,.12);
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.form-error {
  font-size: var(--text-xs);
  color: var(--danger);
  font-weight: var(--fw-medium);
}

/* Input with icon */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: var(--sp-4);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
}
.input-wrapper .form-input { padding-left: calc(var(--sp-4) * 2 + 18px); }

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-red     { background: var(--red-50);    color: var(--red-700); }
.badge-success { background: #e8faf1;           color: #00a844; }
.badge-warning { background: #fff8e1;           color: #d68000; }
.badge-info    { background: #e3f2fd;           color: #1565c0; }
.badge-dark    { background: var(--black-100);  color: var(--black-600); }
.badge-outline { background: transparent; border: 1.5px solid currentColor; }

/* ── Alert / Toast ── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-lg);
  font-size: var(--text-sm);
  border: 1px solid transparent;
}
.alert-success { background: #e8faf1; color: #007a30; border-color: #c3efd7; }
.alert-danger  { background: var(--red-50); color: var(--red-700); border-color: var(--red-200); }
.alert-info    { background: #e3f2fd; color: #1565c0; border-color: #bbdefb; }
.alert-warning { background: #fff8e1; color: #9a6a00; border-color: #ffe082; }

/* ── Divider ── */
.divider {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  color: var(--text-muted);
  font-size: var(--text-sm);
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Spinner ── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
.spinner-sm { width: 14px; height: 14px; }
.spinner-lg { width: 32px; height: 32px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Step Indicator ── */
.steps {
  display: flex;
  align-items: center;
  gap: 0;
}
.step-item {
  display: flex;
  align-items: center;
  flex: 1;
}
.step-item:last-child { flex: 0; }
.step-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  font-family: var(--font-display);
  flex-shrink: 0;
  transition: all var(--dur-base);
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
}
.step-item.active .step-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-red);
}
.step-item.done .step-circle {
  background: var(--black-800);
  border-color: var(--black-800);
  color: var(--white);
}
.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  transition: background var(--dur-base);
}
.step-item.done + .step-item .step-line,
.step-item.done .step-line { background: var(--black-800); }

/* ── Toggle / Switch ── */
.toggle {
  position: relative;
  width: 46px; height: 26px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--black-200);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: background var(--dur-base);
}
.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  background: var(--white);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-base) var(--ease-spring);
}
.toggle input:checked ~ .toggle-track { background: var(--primary); }
.toggle input:checked ~ .toggle-track::after { transform: translateX(20px); }

/* ── Chip / Tag ── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: all var(--dur-fast);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}
.chip .chip-icon { font-size: 16px; }

/* ── Section Title ── */
.section-title {
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  font-size: var(--text-3xl);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.section-title span { color: var(--primary); }

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 600px;
}

/* ── Glow accent ── */
.glow-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
  animation: pulse-dot 2s ease-in-out infinite;
  display: inline-block;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 4px var(--primary-glow); }
  50%       { box-shadow: 0 0 0 8px rgba(230,0,0,.06); }
}

/* ── Number counter badge ── */
.count-badge {
  min-width: 22px; height: 22px;
  padding: 0 6px;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: var(--fw-bold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ══════════════════════════════════════════════════
   WhatsApp Buttons & Floating Chat Bubble
   ══════════════════════════════════════════════════ */

/* White WhatsApp CTA button */
.btn-wp-white {
  background: #ffffff !important;
  color: #111111 !important;
  border: 1px solid #ffffff !important;
  border-radius: var(--r-full);
  padding: 14px 28px;
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--text-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: all var(--dur-base) var(--ease-smooth);
}
.btn-wp-white:hover {
  background: #f4f4f7 !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

/* Floating WhatsApp bubble */
.floating-wp-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
}

.wp-bubble-tooltip {
  background: rgba(20, 20, 25, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: var(--r-full);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: var(--fw-semibold);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--dur-base);
}

.wp-bubble-tooltip .online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25D366;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  animation: wp-dot-pulse 2s infinite;
}

@keyframes wp-dot-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(37, 211, 102, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.wp-bubble-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.45);
  transition: all var(--dur-base) var(--ease-smooth);
  flex-shrink: 0;
  position: relative;
}

.wp-bubble-btn::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.5);
  animation: wp-wave-anim 2.5s infinite;
}

@keyframes wp-wave-anim {
  0% { transform: scale(0.92); opacity: 1; }
  100% { transform: scale(1.35); opacity: 0; }
}

.floating-wp-bubble:hover .wp-bubble-btn {
  transform: scale(1.08) rotate(4deg);
  box-shadow: 0 14px 30px rgba(37, 211, 102, 0.6);
}

.floating-wp-bubble:hover .wp-bubble-tooltip {
  transform: translateX(-4px);
  border-color: #25D366;
}

@media (max-width: 600px) {
  .wp-bubble-tooltip { display: none; }
  .floating-wp-bubble { bottom: 18px; right: 18px; }
  .wp-bubble-btn { width: 50px; height: 50px; }
}
