[hidden] {
  display: none !important;
}

.clinic-branding-card {
  margin-top: 1.5rem;
}

.clinic-branding-card .config-card-header {
  align-items: flex-start;
}

.clinic-branding-card .config-card-header h3 {
  margin: 0 0 0.35rem;
}

.clinic-branding-card .config-card-header p {
  margin: 0;
}

.clinic-image-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.clinic-image-card {
  min-width: 0;
  padding: 1rem;
  border: 1px solid #dce7e8;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(27, 57, 63, 0.05);
}

.clinic-image-heading {
  min-height: 4.25rem;
}

.clinic-image-heading h4 {
  margin: 0 0 0.3rem;
  color: #17343b;
  font-size: 1rem;
}

.clinic-image-heading p {
  margin: 0;
  color: #526c73;
  font-size: 0.8rem;
  line-height: 1.5;
}

.clinic-image-preview {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 180px;
  margin: 0.75rem 0;
  overflow: hidden;
  border: 1px solid #dce7e8;
  border-radius: 12px;
  background: #f4f8f8;
}

.clinic-image-preview img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
}

.clinic-image-preview.clinic-image-avatar {
  min-height: 180px;
}

.clinic-image-avatar img {
  width: 150px;
  height: 150px;
  min-height: 0;
  border: 4px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(23, 52, 59, 0.14);
}

.clinic-image-placeholder,
.clinic-visual-placeholder {
  display: flex;
  min-height: inherit;
  width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem;
  color: #6b8288;
  text-align: center;
  background:
    radial-gradient(ellipse at 15% 15%, rgba(23, 111, 105, 0.07), transparent 42%),
    #f4f8f8;
}

.clinic-image-placeholder svg,
.clinic-visual-placeholder svg {
  width: 2rem;
  height: 2rem;
  color: #176f69;
}

.clinic-image-placeholder span,
.clinic-visual-placeholder span {
  font-size: 0.85rem;
  font-weight: 600;
}

.clinic-image-dropzone {
  position: relative;
  display: flex;
  min-height: 76px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.75rem;
  border: 1px dashed #8db9b4;
  border-radius: 10px;
  background: #f8fbfb;
  color: #29484f;
  cursor: pointer;
  text-align: center;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.clinic-image-dropzone:hover,
.clinic-image-dropzone.is-dragging,
.clinic-image-dropzone:focus-within {
  border-color: #176f69;
  background: #edf6f4;
}

.clinic-image-dropzone strong {
  color: #176f69;
}

.clinic-image-dropzone small {
  color: #6b8288;
  font-size: 0.72rem;
}

.clinic-image-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.clinic-image-input:disabled + span {
  color: #6b8288;
}

.clinic-image-progress {
  display: block;
  width: 100%;
  height: 8px;
  margin-top: 0.75rem;
  accent-color: #176f69;
}

.clinic-image-status {
  min-height: 1.25rem;
  margin: 0.55rem 0;
  color: #526c73;
  font-size: 0.78rem;
  line-height: 1.45;
}

.clinic-image-status.is-error {
  color: #a13434;
}

.clinic-image-status.is-success {
  color: #236548;
}

.clinic-image-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.clinic-image-actions .btn {
  min-height: 40px;
}

.clinic-image-help {
  margin: 1rem 0 0;
  color: #526c73;
  font-size: 0.78rem;
}

.clinic-gallery-grid,
.clinic-gallery-pending-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0.75rem 0;
}

.clinic-gallery-item,
.clinic-gallery-pending-item {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dce7e8;
  border-radius: 10px;
  background: #f4f8f8;
}

.clinic-gallery-item > img,
.clinic-gallery-pending-item > img {
  display: block;
  width: 100%;
  height: 105px;
  object-fit: cover;
}

.clinic-gallery-item.image-missing::before {
  display: grid;
  height: 105px;
  place-items: center;
  color: #6b8288;
  content: "Image unavailable";
  font-size: 0.75rem;
}

.clinic-gallery-item-actions {
  display: flex;
  gap: 0.35rem;
  padding: 0.4rem;
}

.clinic-gallery-item-actions .btn {
  flex: 1;
  min-height: 36px;
  padding: 0.35rem 0.5rem;
  font-size: 0.75rem;
}

.clinic-gallery-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 1.5rem 0.5rem;
  color: #6b8288;
  font-size: 0.82rem;
  text-align: center;
}

.clinic-gallery-pending-item {
  padding-bottom: 0.5rem;
}

.clinic-gallery-pending-item span {
  display: block;
  overflow: hidden;
  padding: 0.4rem 0.5rem;
  color: #526c73;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clinic-gallery-pending-item .btn {
  min-height: 34px;
  margin: 0 0.4rem;
  padding: 0.3rem 0.45rem;
  font-size: 0.72rem;
}

.clinic-cover-frame {
  position: relative;
  height: clamp(190px, 30vw, 360px);
  overflow: hidden;
  border: 1px solid #dce7e8;
  border-radius: 20px;
  background: #f4f8f8;
  box-shadow: 0 10px 28px rgba(27, 57, 63, 0.08);
}

.clinic-cover-frame > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.clinic-gallery-heading {
  margin: 3rem 0 1.5rem;
}

.clinic-public-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.clinic-public-gallery-item {
  min-width: 0;
  height: 230px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #dce7e8;
  border-radius: 14px;
  background: #f4f8f8;
  box-shadow: 0 6px 18px rgba(27, 57, 63, 0.06);
}

.clinic-public-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.clinic-public-gallery-item.image-missing {
  display: grid;
  place-items: center;
  color: #6b8288;
  font-size: 0.8rem;
}

.clinic-public-gallery-item.image-missing::after {
  content: "Clinic photo unavailable";
}

.clinic-public-gallery-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 1.25rem;
  border: 1px solid #dce7e8;
  border-radius: 12px;
  background: #ffffff;
  color: #6b8288;
  text-align: center;
}

.doctor-public-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.doctor-avatar-placeholder:has(.doctor-public-photo:not([hidden])) {
  overflow: hidden;
}

.clinic-image-avatar .clinic-image-pending-preview,
.clinic-image-cover-preview .clinic-image-pending-preview {
  position: absolute;
  inset: 0;
}

@media (max-width: 1100px) {
  .clinic-image-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .clinic-gallery-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .clinic-image-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .clinic-gallery-card {
    grid-column: auto;
  }

  .clinic-image-heading {
    min-height: 0;
  }

  .clinic-public-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .clinic-public-gallery-item {
    height: 170px;
  }

  .clinic-cover-frame {
    border-radius: 14px;
  }
}

@media (max-width: 420px) {
  .clinic-image-card {
    padding: 0.8rem;
  }

  .clinic-image-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .clinic-image-actions .btn {
    width: 100%;
    padding-inline: 0.45rem;
    font-size: 0.8rem;
  }

  .clinic-public-gallery {
    grid-template-columns: minmax(0, 1fr);
  }

  .clinic-public-gallery-item {
    height: 210px;
  }
}
