/* ============================================================
   HSDD Doctors — Frontend CSS
   ============================================================ */

/* Grid */
.hsdd-doctors-grid {
  display: grid;
  grid-template-columns: repeat( auto-fit, minmax(260px, 1fr) );
  gap: 24px;
  padding: 0;
  list-style: none;
}

/* Card */
.hsdd-doc-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

/* Avatar / image (round) */
.hsdd-doc-card__avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #f0f0f0;
  border: 1px solid #e1e1e1;
  margin-bottom: 8px;
}
.hsdd-doc-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hsdd-doc-card__img--placeholder {
  background: linear-gradient( 135deg, #d0d7e3 0%, #b8c4d6 100% );
}

/* Body content */
.hsdd-doc-card__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
}
.hsdd-doc-card__body p {
  margin-bottom: 8px;
}
.hsdd-doc-card__name {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
  color: #1a1a2e;
}
.hsdd-doc-card__spec {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hsdd-doc-card__room {
  font-size: 0.78rem;
  color: #9ca3af;
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}

/* Status (green pulsing dot) */
.hsdd-doc-card__status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 0.82rem;
}
.hsdd-doc-card__status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hsdd-doc-card__status-slots {
  font-size: 0.8rem;
  color: #374151;
  font-variant-numeric: tabular-nums;
}
.hsdd-doc-card__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.hsdd-doc-card__status.is-active .hsdd-doc-card__dot {
  background: #22c55e;
  animation: hsdd-pulse 2s ease-in-out infinite;
}
.hsdd-doc-card__status.is-inactive .hsdd-doc-card__dot {
  background: #9ca3af;
}
.hsdd-doc-card__status-text {
  font-weight: 700;
}
.hsdd-doc-card__status.is-active .hsdd-doc-card__status-text {
  color: #16a34a;
}
.hsdd-doc-card__status.is-inactive .hsdd-doc-card__status-text {
  color: #6b7280;
}
@keyframes hsdd-pulse {
  0%   { box-shadow: 0 0 0 0 rgba( 34, 197, 94, 0.5 ); }
  70%  { box-shadow: 0 0 0 8px rgba( 34, 197, 94, 0 ); }
  100% { box-shadow: 0 0 0 0 rgba( 34, 197, 94, 0 ); }
}

/* CTA Button */
.hsdd-doc-card__btn {
  margin-top: 8px;
  padding: 8px 18px;
  border: 1.5px solid #2563eb;
  border-radius: 6px;
  background: transparent;
  color: #2563eb;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.hsdd-doc-card__btn:hover {
  background: #2563eb;
  color: #fff;
}

/* Modal overlay + container */
.hsdd-doc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba( 0, 0, 0, 0.5 );
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.hsdd-doc-modal {
  background: #fff;
  border-radius: 12px;
  padding: 28px 24px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.hsdd-doc-modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #6b7280;
  line-height: 1;
  padding: 0;
}
.hsdd-doc-modal__close:hover {
  color: #111;
}
.hsdd-doc-modal__name {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: #1a1a2e;
  padding-right: 32px;
}
.hsdd-doc-modal__spec {
  font-size: 0.82rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 20px;
}
.hsdd-doc-modal__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.hsdd-doc-modal__table th,
.hsdd-doc-modal__table td {
  padding: 8px 10px;
  text-align: left;
  border: 2px solid #fff !important;
}
.hsdd-doc-modal__table th {
  font-weight: 600;
  color: #374151;
  background: #f3f4f6;
}
.hsdd-doc-modal__table tbody tr:not(.is-closed) td {
  background: #dcfce7;
  color: #166534;
}
.hsdd-doc-modal__table tr.is-closed td {
  background: #f3f4f6;
  color: #9ca3af;
}
.hsdd-doc-modal__stanza {
  font-size: 0.82rem;
  color: #6b7280;
  margin: 14px 0 0;
  text-align: center;
}

/* Font +2px su desktop */
@media ( min-width: 768px ) {
  .hsdd-doc-card__name     { font-size: 1.175rem; }
  .hsdd-doc-card__spec     { font-size: 0.975rem; }
  .hsdd-doc-card__room     { font-size: 0.905rem; }
  .hsdd-doc-card__status   { font-size: 0.945rem; }
  .hsdd-doc-card__status-slots { font-size: 0.925rem; }
  .hsdd-doc-card__btn      { font-size: 0.975rem; }
}
