/**
 * Anlaşmalı Sağlık Kurumları Sonuç Modalı Stilleri
 * anlasmalihastaneler — Adburbs Digital Agency
 */

/* ── Modal Overlay ── */
.ah-hastane-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  background: rgba(15, 25, 35, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

.ah-hastane-modal-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

/* ── Modal Dialog ── */
.ah-hastane-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 920px;
  max-height: 90vh;
  background: var(--c-white);
  border-radius: var(--radius-2xl, 24px);
  box-shadow: 0 24px 64px rgba(15, 25, 35, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ah-hastane-modal-overlay.is-active .ah-hastane-modal-dialog {
  transform: translateY(0) scale(1);
}

/* ── Modal Header ── */
.ah-hastane-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-6);
  background: linear-gradient(135deg, #0A7C5E 0%, #086149 100%);
  color: var(--c-white);
  flex-shrink: 0;
  position: relative;
}

.ah-hastane-modal-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.ah-hastane-modal-logo-wrap {
  width: 52px;
  height: 38px;
  background: var(--c-white);
  border-radius: var(--radius-md, 8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.ah-hastane-modal-logo-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.ah-hastane-modal-title {
  font-family: var(--font-heading);
  font-size: var(--fs-lg, 1.25rem);
  font-weight: 800;
  color: var(--c-white);
  margin: 0 0 2px;
  line-height: 1.2;
}

.ah-hastane-modal-subtitle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--fs-xs, 0.8rem);
  color: rgba(255, 255, 255, 0.88);
  font-weight: 500;
}

.ah-hastane-modal-subtitle svg {
  color: #7ef5cf;
}

.ah-hastane-modal-close {
  appearance: none;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: var(--c-white);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full, 9999px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ah-hastane-modal-close:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: rotate(90deg);
}

/* ── Filter Bar ── */
.ah-hastane-filter-bar {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr 1fr;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-6);
  background: var(--c-gray-50, #f8fafc);
  border-bottom: 1px solid var(--c-gray-150, #e2e8f0);
  flex-shrink: 0;
}

.ah-hastane-filter-bar.is-single-network {
  grid-template-columns: 1.5fr 1fr;
}

.ah-hastane-filter-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ah-filter-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--c-gray-600, #475569);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ah-filter-label svg {
  color: var(--c-primary, #0A7C5E);
}

.ah-hastane-select-wrap,
.ah-hastane-search-box {
  position: relative;
  width: 100%;
}

.ah-hastane-search-box {
  display: flex;
  align-items: center;
}

.ah-hastane-search-input {
  width: 100%;
  height: 42px;
  padding: 0 32px 0 12px;
  font-size: var(--fs-xs, 0.84rem);
  font-weight: 600;
  color: var(--c-dark, #0f172a);
  background: var(--c-white);
  border: 1.5px solid var(--c-gray-200, #cbd5e1);
  border-radius: var(--radius-lg, 10px);
  outline: none;
  transition: all 0.2s ease;
}

/* Hide native search cancel / clear buttons */
.ah-hastane-search-input::-webkit-search-cancel-button,
.ah-hastane-search-input::-webkit-search-decoration,
.ah-hastane-search-input::-webkit-search-results-button,
.ah-hastane-search-input::-webkit-search-results-decoration,
.ah-hastane-search-input::-ms-clear {
  -webkit-appearance: none;
  appearance: none;
  display: none !important;
}

.ah-hastane-search-input:focus {
  border-color: var(--c-primary, #0A7C5E);
  box-shadow: 0 0 0 3px rgba(10, 124, 94, 0.12);
}

.ah-hastane-search-clear {
  position: absolute;
  right: 8px;
  appearance: none;
  border: none;
  background: transparent;
  color: var(--c-gray-400);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 4px;
}

.ah-hastane-search-clear:hover {
  color: var(--c-dark);
}

/* ── Modal Custom Select Dropdowns ── */
.ah-modal-custom-select {
  position: relative;
  width: 100%;
}

.ah-modal-custom-select-trigger {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  background: var(--c-white);
  border: 1.5px solid var(--c-gray-200, #cbd5e1);
  border-radius: var(--radius-lg, 10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  outline: none;
  font-size: var(--fs-xs, 0.84rem);
  font-weight: 700;
  color: var(--c-dark, #0f172a);
  transition: all 0.2s ease;
  user-select: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.ah-modal-custom-select-trigger:hover {
  border-color: var(--c-primary, #0A7C5E);
  background: #fdfefe;
}

.ah-modal-custom-select.is-open .ah-modal-custom-select-trigger {
  border-color: var(--c-primary, #0A7C5E);
  box-shadow: 0 0 0 3px rgba(10, 124, 94, 0.12);
  background: var(--c-white);
}

.ah-modal-custom-select-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  text-align: left;
}

.ah-modal-custom-select-arrow {
  color: var(--c-gray-500);
  transition: transform 0.2s ease, color 0.2s;
  flex-shrink: 0;
  margin-left: 6px;
}

.ah-modal-custom-select.is-open .ah-modal-custom-select-arrow {
  transform: rotate(180deg);
  color: var(--c-primary, #0A7C5E);
}

.ah-modal-custom-select-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(10, 124, 94, 0.2);
  border-radius: var(--radius-xl, 14px);
  box-shadow: 0 18px 40px rgba(15, 25, 35, 0.18);
  max-height: 270px;
  overflow-y: auto;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
}

.ah-modal-custom-select.is-open .ah-modal-custom-select-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.ah-modal-custom-select-group-header {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-primary, #0A7C5E);
  padding: 6px 10px 3px;
  user-select: none;
  background: rgba(10, 124, 94, 0.05);
  border-radius: 6px;
  margin: 4px 0 2px;
}

.ah-modal-custom-select-divider {
  height: 1px;
  background: var(--c-gray-150, #e2e8f0);
  margin: 4px 6px;
  pointer-events: none;
}

.ah-modal-custom-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: var(--fs-xs, 0.83rem);
  font-weight: 600;
  color: var(--c-dark, #1e293b);
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.ah-modal-custom-select-option:hover {
  background: rgba(10, 124, 94, 0.08);
  color: #06543f;
}

.ah-modal-custom-select-option.is-selected {
  background: var(--c-primary, #0A7C5E) !important;
  color: var(--c-white) !important;
  font-weight: 700;
}

.ah-modal-custom-select-check {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  flex-shrink: 0;
}

.ah-modal-custom-select-option.is-selected .ah-modal-custom-select-check {
  opacity: 1;
}

.ah-modal-custom-select-options::-webkit-scrollbar {
  width: 5px;
}
.ah-modal-custom-select-options::-webkit-scrollbar-track {
  background: transparent;
}
.ah-modal-custom-select-options::-webkit-scrollbar-thumb {
  background: var(--c-gray-300, #cbd5e1);
  border-radius: 6px;
}

/* ── Status Bar ── */
.ah-hastane-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-2) var(--sp-6);
  background: rgba(10, 124, 94, 0.04);
  border-bottom: 1px solid rgba(10, 124, 94, 0.08);
  font-size: var(--fs-xs, 0.8rem);
  flex-shrink: 0;
}

.ah-hastane-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--c-primary, #0A7C5E);
}

.ah-pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--c-primary, #0A7C5E);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(10, 124, 94, 0.7);
  animation: ahPulse 2s infinite;
}

@keyframes ahPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(10, 124, 94, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(10, 124, 94, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(10, 124, 94, 0);
  }
}

.ah-hastane-current-network-badge {
  background: rgba(10, 124, 94, 0.12);
  color: #06543f;
  font-weight: 700;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ── Results Body List ── */
.ah-hastane-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-5) var(--sp-6);
  min-height: 280px;
  max-height: 520px;
  background: var(--c-white);
  -webkit-overflow-scrolling: touch;
}

/* Scrollbar */
.ah-hastane-modal-body::-webkit-scrollbar {
  width: 6px;
}

.ah-hastane-modal-body::-webkit-scrollbar-track {
  background: var(--c-gray-50);
}

.ah-hastane-modal-body::-webkit-scrollbar-thumb {
  background: var(--c-gray-300, #cbd5e1);
  border-radius: 10px;
}

.ah-hastane-modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--c-gray-400, #94a3b8);
}

/* ── Loading State ── */
.ah-hastane-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-10) var(--sp-4);
  gap: var(--sp-4);
  color: var(--c-gray-500);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.ah-hastane-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(10, 124, 94, 0.15);
  border-top-color: var(--c-primary, #0A7C5E);
  border-radius: 50%;
  animation: ahSpin 0.75s linear infinite;
}

@keyframes ahSpin {
  to { transform: rotate(360deg); }
}

/* ── Cards Grid ── */
.ah-hastane-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
}

/* ── Hospital Card ── */
.ah-hastane-card {
  background: var(--c-white);
  border: 1px solid var(--c-gray-150, #e2e8f0);
  border-radius: var(--radius-xl, 16px);
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--sp-3);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(15, 25, 35, 0.03);
  position: relative;
}

.ah-hastane-card:hover {
  border-color: rgba(10, 124, 94, 0.35);
  box-shadow: 0 10px 24px rgba(15, 25, 35, 0.06);
  transform: translateY(-2px);
}

.ah-card-header {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.ah-card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.ah-card-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 6px;
}

.ah-badge-type {
  background: rgba(10, 124, 94, 0.1);
  color: var(--c-primary, #0A7C5E);
}

.ah-badge-district {
  background: var(--c-gray-100, #f1f5f9);
  color: var(--c-gray-600, #475569);
}

.ah-card-title {
  font-family: var(--font-heading);
  font-size: var(--fs-sm, 0.95rem);
  font-weight: 800;
  color: var(--c-dark, #0f172a);
  line-height: 1.35;
  margin: 0;
  text-transform: uppercase;
}

.ah-card-address {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: var(--fs-xs, 0.8rem);
  color: var(--c-gray-500, #64748b);
  line-height: 1.45;
  margin: 0;
}

.ah-card-address svg {
  color: var(--c-gray-400);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Card Actions */
.ah-card-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding-top: var(--sp-2);
  border-top: 1px dashed var(--c-gray-150, #e2e8f0);
}

.ah-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: var(--fs-xs, 0.8rem);
  font-weight: 700;
  padding: 7px 12px;
  border-radius: var(--radius-md, 8px);
  text-decoration: none;
  transition: all 0.2s ease;
  flex: 1;
}

.ah-card-btn--tel {
  background: rgba(10, 124, 94, 0.08);
  color: var(--c-primary, #0A7C5E);
}

.ah-card-btn--tel:hover {
  background: var(--c-primary, #0A7C5E);
  color: var(--c-white);
}

.ah-card-btn--map {
  background: var(--c-gray-100, #f1f5f9);
  color: var(--c-gray-700, #334155);
}

.ah-card-btn--map:hover {
  background: var(--c-accent, #1A6FA8);
  color: var(--c-white);
}

/* ── Empty State ── */
.ah-hastane-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-10) var(--sp-6);
  gap: var(--sp-3);
  max-width: 480px;
  margin-inline: auto;
}

.ah-empty-icon {
  width: 68px;
  height: 68px;
  background: rgba(10, 124, 94, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-primary, #0A7C5E);
  margin-bottom: var(--sp-2);
}

.ah-hastane-empty-state h3 {
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  font-weight: 800;
  color: var(--c-dark);
  margin: 0;
}

.ah-hastane-empty-state p {
  font-size: var(--fs-xs);
  color: var(--c-gray-500);
  line-height: var(--lh-relaxed);
  margin: 0;
}

/* ── Modal Footer ── */
.ah-hastane-modal-footer {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #f0fdf9 100%);
  border-top: 1.5px solid #a7f3d0;
  box-shadow: 0 -4px 20px rgba(10, 124, 94, 0.08);
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: var(--sp-3);
  z-index: 2;
}

/* Üst Kenarda Soldan Sağa Kayan Işık Akışı */
.ah-hastane-modal-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, #34d399 50%, #10b981 80%, transparent 100%);
  animation: ahFooterLightBeam 3.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes ahFooterLightBeam {
  0% { left: -60%; }
  100% { left: 160%; }
}

.ah-hastane-footer-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #064e3b;
  letter-spacing: -0.01em;
}

/* Soldan Sağa Sürekli Akan Parlak Gradyan & Işık Efekti */
.ah-hastane-footer-info strong,
.ah-hastane-footer-text-el strong {
  font-weight: 800;
  background: linear-gradient(
    90deg,
    #065f46 0%,
    #0A7C5E 20%,
    #10b981 40%,
    #34d399 50%,
    #10b981 60%,
    #0A7C5E 80%,
    #065f46 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  animation: ahTextLightFlow 3.5s linear infinite;
  text-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.ah-hastane-footer-text-el a {
  color: inherit;
  text-decoration: none;
}

.ah-hastane-footer-text-el a:hover {
  text-decoration: underline;
  text-decoration-color: #10b981;
}

@keyframes ahTextLightFlow {
  0% {
    background-position: 200% center;
  }
  100% {
    background-position: 0% center;
  }
}

.ah-footer-heart-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #d1fae5;
  color: #0A7C5E;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(10, 124, 94, 0.15);
  animation: ahHeartPulse 2.5s ease-in-out infinite;
}

@keyframes ahHeartPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(10, 124, 94, 0.15);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.4);
    background: #a7f3d0;
  }
}

.ah-footer-heart-icon {
  color: #0A7C5E;
  flex-shrink: 0;
}

.ah-hastane-offer-cta-btn {
  position: relative;
  overflow: hidden;
  appearance: none;
  border: none;
  background: linear-gradient(135deg, #0A7C5E 0%, #086149 100%);
  color: var(--c-white);
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-lg, 12px);
  font-size: 0.9rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(10, 124, 94, 0.28);
  transition: all 0.2s ease;
}

/* Buton Üzerinde Akan Işık Yansıması */
.ah-hastane-offer-cta-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -100%;
  width: 50%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(25deg);
  animation: ahBtnShine 4s ease-in-out infinite 1.5s;
}

@keyframes ahBtnShine {
  0% { left: -100%; }
  35%, 100% { left: 200%; }
}

.ah-hastane-offer-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(10, 124, 94, 0.38);
  filter: brightness(1.06);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .ah-hastane-modal-overlay {
    padding: var(--sp-2);
    align-items: flex-end;
  }

  .ah-hastane-modal-dialog {
    max-height: 94vh;
    border-radius: var(--radius-2xl, 24px) var(--radius-2xl, 24px) 0 0;
  }

  .ah-hastane-modal-header {
    padding: var(--sp-3) var(--sp-4);
  }

  .ah-hastane-filter-bar {
    grid-template-columns: 1fr;
    padding: var(--sp-3) var(--sp-4);
    gap: var(--sp-2);
  }

  .ah-hastane-status-bar {
    padding: var(--sp-2) var(--sp-4);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .ah-hastane-cards-grid {
    grid-template-columns: 1fr;
  }

  .ah-hastane-modal-body {
    padding: var(--sp-4);
    max-height: 55vh;
  }

  .ah-hastane-modal-footer {
    padding: var(--sp-3) var(--sp-4);
    flex-direction: column;
    align-items: stretch;
  }

  .ah-hastane-offer-cta-btn {
    justify-content: center;
  }
}
