/* ============================================================
   LEGAL & CONSENT MODAL CSS — Anlaşmalı Hastaneler
   Adburbs Digital Agency — 2026
   ============================================================ */

/* ── Overlay ── */
.ah-legal-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ah-legal-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* ── Dialog ── */
.ah-legal-modal-dialog {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.8);
  width: 100%;
  max-width: 780px;
  height: 695px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 2rem 2.25rem;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

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

.ah-legal-modal-dialog::-webkit-scrollbar {
  width: 6px;
}
.ah-legal-modal-dialog::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

/* ── Close Button ── */
.ah-legal-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.ah-legal-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: rotate(90deg);
}

.ah-legal-modal-close svg {
  width: 16px;
  height: 16px;
}

/* ── Modal Header ── */
.ah-legal-modal-header {
  margin-bottom: 1.25rem;
  height: 88px;
  min-height: 88px;
  box-sizing: border-box;
}

.ah-legal-header-top {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.ah-legal-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.ah-legal-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #2563eb;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.ah-legal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.25;
}

.ah-legal-subtitle {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0.4rem 0 0 0;
}

/* ── Tabs Bar ── */
.ah-legal-tabs-bar {
  display: flex;
  gap: 0.5rem;
  background: #f8fafc;
  padding: 0.35rem;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.ah-legal-tab-btn {
  flex: 1;
  min-width: 140px;
  padding: 0.6rem 1rem;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
}

.ah-legal-tab-btn:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.6);
}

.ah-legal-tab-btn.is-active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

/* ── Tab Panels ── */
.ah-legal-tab-panel {
  display: none;
  flex: 1;
}

.ah-legal-tab-panel.is-active {
  display: flex;
  flex-direction: column;
  animation: ahLegalFadeIn 0.25s ease-out;
  flex: 1;
}

@keyframes ahLegalFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── 3 Cards Grid ── */
.ah-legal-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.ah-legal-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  padding: 1.25rem 1.1rem;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  min-height: 185px;
  height: 185px;
  box-sizing: border-box;
}

.ah-legal-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.ah-legal-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.ah-legal-card-icon.icon-blue {
  background: #eff6ff;
  color: #2563eb;
}

.ah-legal-card-icon.icon-indigo {
  background: #eef2ff;
  color: #4f46e5;
}

.ah-legal-card-icon.icon-emerald {
  background: #ecfdf5;
  color: #059669;
}

.ah-legal-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.4rem 0;
  line-height: 1.3;
}

.ah-legal-card-desc {
  font-size: 0.825rem;
  color: #475569;
  line-height: 1.45;
  margin: 0;
  flex: 1;
}

/* ── Detail Accordion ── */
.ah-legal-fulltext-accordion {
  margin-bottom: 1.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  background: #f8fafc;
}

.ah-legal-toggle-fulltext {
  width: 100%;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #2563eb;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ah-legal-toggle-fulltext:hover {
  background: #f1f5f9;
}

.ah-legal-toggle-fulltext svg {
  transition: transform 0.2s ease;
}

.ah-legal-toggle-fulltext[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.ah-legal-fulltext-body {
  display: none;
  padding: 1rem 1.25rem;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}

.ah-legal-fulltext-body.is-open {
  display: block;
}

.ah-legal-scroll-content {
  max-height: 180px;
  overflow-y: auto;
  font-size: 0.825rem;
  color: #334155;
  line-height: 1.6;
  padding-right: 0.5rem;
}

.ah-legal-scroll-content h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0.75rem 0 0.25rem 0;
}

.ah-legal-scroll-content h4:first-child {
  margin-top: 0;
}

.ah-legal-scroll-content p {
  margin: 0 0 0.5rem 0;
}

/* ── Alert Strip ── */
.ah-legal-alert-strip {
  margin-top: auto;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  padding: 0.85rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: #166534;
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.ah-legal-alert-icon {
  color: #16a34a;
  flex-shrink: 0;
}

/* ── Footer Actions ── */
.ah-legal-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.ah-legal-footer-note {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 500;
}

.ah-legal-btn-submit {
  appearance: none;
  border: none;
  background: #0f172a;
  color: #ffffff;
  padding: 0.8rem 1.6rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.ah-legal-btn-submit:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.22);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .ah-legal-modal-dialog {
    padding: 1.5rem 1.25rem;
    border-radius: 20px;
  }

  .ah-legal-cards-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .ah-legal-tabs-bar {
    flex-direction: column;
    gap: 0.25rem;
  }

  .ah-legal-tab-btn {
    min-width: 100%;
    justify-content: flex-start;
  }

  .ah-legal-modal-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .ah-legal-btn-submit {
    text-align: center;
    width: 100%;
  }
}
