/* =========================================================
   CMR Personel – Registration Overlay (Landing Mode)
   Odpala się gdy URL zawiera ?umow=1
   ========================================================= */

/* ══════════════════════════════════
   OVERLAY — pełnoekranowe tło
══════════════════════════════════ */

#cmr-reg-overlay {
  position:   fixed;
  inset:      0;
  z-index:    999999990;
  background: linear-gradient(160deg, #04152D 0%, #0A2A5E 50%, #051A3E 100%);
  display:    flex;
  flex-direction: column;
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;

  /* animacja wejścia */
  opacity:   0;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

#cmr-reg-overlay.cmr-reg--visible {
  opacity: 1;
  pointer-events: all;
}

/* Stan zamkniętia — zsuwa się w dół (w kierunku paska CTA) */
#cmr-reg-overlay.cmr-reg--closing {
  opacity:   0;
  transform: translateY(100%);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.55s cubic-bezier(0.4, 0, 1, 1);
}

/* Tekstura tła */
#cmr-reg-overlay::before {
  content:  '';
  position: absolute;
  inset:    0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(0,163,224,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(0,87,184,0.15) 0%, transparent 60%);
  pointer-events: none;
}

/* ══════════════════════════════════
   HEADER OVERLAY
══════════════════════════════════ */

.cmr-reg-header {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  padding:         20px 32px;
  border-bottom:   1px solid rgba(255,255,255,0.08);
  flex-shrink:     0;
  position:        relative;
  z-index:         2;
}

.cmr-reg-logo {
  display:     flex;
  align-items: center;
  gap:         10px;
}

.cmr-reg-logo-mark {
  width:           36px;
  height:          36px;
  border-radius:   10px;
  background:      linear-gradient(135deg, #0070CC, #00A3E0);
  display:         flex;
  align-items:     center;
  justify-content: center;
  box-shadow:      0 4px 12px rgba(0,163,224,0.4);
}

.cmr-reg-logo-mark svg {
  width:  20px;
  height: 20px;
  color:  #fff;
}

.cmr-reg-logo-text {
  font-size:      15px;
  font-weight:    700;
  color:          #fff;
  letter-spacing: -0.01em;
}

.cmr-reg-logo-sub {
  font-size:   11px;
  font-weight: 400;
  color:        rgba(255,255,255,0.5);
  margin-left:  4px;
}

.cmr-reg-close-btn {
  display:         flex;
  align-items:     center;
  gap:             8px;
  background:      rgba(255,255,255,0.08);
  border:          1px solid rgba(255,255,255,0.15);
  color:           rgba(255,255,255,0.75);
  border-radius:   10px;
  padding:         9px 16px;
  font-size:       13px;
  font-weight:     600;
  font-family:     inherit;
  cursor:          pointer;
  transition:      all 0.2s ease;
  white-space:     nowrap;
}

.cmr-reg-close-btn svg {
  width:  15px;
  height: 15px;
}

.cmr-reg-close-btn:hover {
  background:   rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.35);
  color:        #fff;
  transform:    translateY(-1px);
}

/* ══════════════════════════════════
   HERO SEKCJA — tytuł
══════════════════════════════════ */

.cmr-reg-hero {
  padding:    28px 32px 16px;
  position:   relative;
  z-index:    2;
  flex-shrink: 0;
}

.cmr-reg-eyebrow {
  display:        inline-flex;
  align-items:    center;
  gap:            6px;
  font-size:      11px;
  font-weight:    700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color:          #00C8A0;
  margin-bottom:  10px;
}

.cmr-reg-eyebrow-dot {
  width:         6px;
  height:        6px;
  border-radius: 50%;
  background:    #00C8A0;
  animation:     cmrRegPulse 2s ease-in-out infinite;
}

@keyframes cmrRegPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

.cmr-reg-title {
  font-size:      32px;
  font-weight:    800;
  color:          #fff;
  margin:         0 0 6px;
  letter-spacing: -0.03em;
  line-height:    1.15;
}

.cmr-reg-title-spec {
  background:              linear-gradient(90deg, #00A3E0, #00C8A0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip:         text;
}

.cmr-reg-subtitle {
  font-size:   15px;
  color:       rgba(255,255,255,0.55);
  margin:      0;
  font-weight: 400;
}

/* ══════════════════════════════════
   CONTENT — scrollowalna część
══════════════════════════════════ */

.cmr-reg-content {
  flex:       1;
  overflow-y: auto;
  padding:    20px 32px 24px;
  position:   relative;
  z-index:    2;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.cmr-reg-content::-webkit-scrollbar { width: 4px; }
.cmr-reg-content::-webkit-scrollbar-track { background: transparent; }
.cmr-reg-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

/* ── Siatka lekarzy ── */
.cmr-reg-docs-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap:                   14px;
  margin-bottom:         28px;
}

/* Karta lekarza */
.cmr-reg-doc-card {
  background:    rgba(255,255,255,0.05);
  border:        1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  padding:       20px;
  display:       flex;
  flex-direction: column;
  gap:           14px;
  transition:    all 0.25s ease;
  backdrop-filter: blur(10px);
}

.cmr-reg-doc-card:hover {
  background:   rgba(255,255,255,0.09);
  border-color: rgba(0,163,224,0.4);
  transform:    translateY(-3px);
  box-shadow:   0 12px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(0,163,224,0.2);
}

.cmr-reg-doc-card--inactive {
  opacity: 0.4;
  filter:  grayscale(1);
  pointer-events: none;
}

.cmr-reg-doc-top {
  display:     flex;
  align-items: center;
  gap:         14px;
}

.cmr-reg-doc-avatar {
  width:           60px;
  height:          60px;
  border-radius:   50%;
  overflow:        hidden;
  background:      linear-gradient(135deg, #1a3a6e, #0057B8);
  display:         flex;
  align-items:     center;
  justify-content: center;
  flex-shrink:     0;
  border:          2px solid rgba(0,163,224,0.3);
}

.cmr-reg-doc-avatar img {
  width:      100%;
  height:     100%;
  object-fit: cover;
}

.cmr-reg-doc-avatar svg {
  width:  28px;
  height: 28px;
  color:  rgba(255,255,255,0.5);
}

.cmr-reg-doc-meta {
  flex:      1;
  min-width: 0;
}

.cmr-reg-doc-name {
  font-size:   16px;
  font-weight: 700;
  color:       #fff;
  margin:      0 0 4px;
  line-height: 1.25;
}

.cmr-reg-doc-tags {
  display:   flex;
  flex-wrap: wrap;
  gap:       4px;
}

.cmr-reg-doc-tag {
  font-size:      9px;
  font-weight:    700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding:        3px 8px;
  border-radius:  20px;
  background:     rgba(0,163,224,0.15);
  color:          #7ECFEA;
  border:         1px solid rgba(0,163,224,0.25);
}

/* CTA przycisk w karcie */
.cmr-reg-doc-btn {
  display:         flex;
  align-items:     center;
  justify-content: center;
  gap:             8px;
  width:           100%;
  padding:         11px 16px;
  background:      linear-gradient(135deg, #0057B8, #0070CC);
  color:           #fff !important;
  text-decoration: none !important;
  border-radius:   10px;
  font-size:       13px;
  font-weight:     700;
  font-family:     inherit;
  transition:      all 0.2s ease;
  box-shadow:      0 4px 14px rgba(0,87,184,0.35);
  border:          none;
  cursor:          pointer;
}

.cmr-reg-doc-btn:hover {
  background: linear-gradient(135deg, #0070CC, #00A3E0);
  transform:  translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,87,184,0.5);
}

.cmr-reg-doc-btn svg {
  width:  14px;
  height: 14px;
  flex-shrink: 0;
}

.cmr-reg-doc-unavailable {
  text-align:  center;
  padding:     10px;
  font-size:   12px;
  font-weight: 600;
  color:       rgba(255,255,255,0.3);
  background:  rgba(255,255,255,0.04);
  border:      1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
}

/* ── Separator ── */
.cmr-reg-divider {
  display:     flex;
  align-items: center;
  gap:         16px;
  margin:      4px 0 24px;
}

.cmr-reg-divider-line {
  flex:       1;
  height:     1px;
  background: rgba(255,255,255,0.08);
}

.cmr-reg-divider-text {
  font-size:      11px;
  font-weight:    600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color:          rgba(255,255,255,0.3);
  white-space:    nowrap;
}

/* ── Sekcja kontaktu (telefon + chat) ── */
.cmr-reg-contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap:     12px;
}

.cmr-reg-contact-card {
  background:    rgba(255,255,255,0.05);
  border:        1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  padding:       20px;
  display:       flex;
  flex-direction: column;
  gap:           12px;
  transition:    all 0.2s ease;
}

.cmr-reg-contact-card:hover {
  background:   rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
  transform:    translateY(-2px);
}

.cmr-reg-contact-icon {
  width:           44px;
  height:          44px;
  border-radius:   12px;
  display:         flex;
  align-items:     center;
  justify-content: center;
}

.cmr-reg-contact-icon--phone {
  background: rgba(0,200,160,0.15);
  border:     1px solid rgba(0,200,160,0.25);
}

.cmr-reg-contact-icon--chat {
  background: rgba(99,102,241,0.15);
  border:     1px solid rgba(99,102,241,0.25);
}

.cmr-reg-contact-icon svg {
  width:  22px;
  height: 22px;
}

.cmr-reg-contact-icon--phone svg { color: #00C8A0; }
.cmr-reg-contact-icon--chat svg  { color: #818cf8; }

.cmr-reg-contact-label {
  font-size:   11px;
  font-weight: 600;
  color:       rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin:      0;
}

.cmr-reg-contact-value {
  font-size:   20px;
  font-weight: 800;
  color:       #fff;
  margin:      0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.cmr-reg-contact-sub {
  font-size:  12px;
  color:      rgba(255,255,255,0.4);
  margin:     0;
}

.cmr-reg-contact-btn {
  display:         flex;
  align-items:     center;
  justify-content: center;
  gap:             8px;
  padding:         11px;
  border-radius:   10px;
  font-size:       13px;
  font-weight:     700;
  font-family:     inherit;
  text-decoration: none !important;
  border:          none;
  cursor:          pointer;
  transition:      all 0.2s ease;
  margin-top:      auto;
}

.cmr-reg-contact-btn--phone {
  background: linear-gradient(135deg, #00A878, #00C8A0);
  color:      #fff !important;
  box-shadow: 0 4px 14px rgba(0,200,160,0.35);
}

.cmr-reg-contact-btn--phone:hover {
  background: linear-gradient(135deg, #00C8A0, #00E0B4);
  transform:  translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,200,160,0.5);
}

.cmr-reg-contact-btn--chat {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color:      #fff !important;
  box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}

.cmr-reg-contact-btn--chat:hover {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  transform:  translateY(-2px);
  box-shadow: 0 8px 24px rgba(99,102,241,0.5);
}

.cmr-reg-contact-btn svg {
  width:  15px;
  height: 15px;
}

/* ══════════════════════════════════
   RESPONSIVE
══════════════════════════════════ */

@media (max-width: 768px) {
  .cmr-reg-header { padding: 14px 16px; }
  .cmr-reg-hero   { padding: 20px 16px 12px; }
  .cmr-reg-content{ padding: 16px 16px 20px; }

  .cmr-reg-title  { font-size: 24px; }

  .cmr-reg-close-btn span { display: none; }
  .cmr-reg-close-btn { padding: 9px 12px; }

  .cmr-reg-docs-grid { grid-template-columns: 1fr; gap: 10px; }

  .cmr-reg-contact { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .cmr-reg-title { font-size: 20px; }
  .cmr-reg-logo-sub { display: none; }
}
