/* ===================================================
   Healix Treatments Manager — Public Styles
   =================================================== */

/* ── CSS Variables ── */
:root {
  --htm-primary:       #1a6baf;
  --htm-primary-dark:  #124d82;
  --htm-secondary:     #e8f0f9;
  --htm-text:          #1a2b4b;
  --htm-text-muted:    #6c757d;
  --htm-white:         #ffffff;
  --htm-border:        #e2e8f0;
  --htm-radius:        12px;
  --htm-shadow:        0 4px 20px rgba(0,0,0,.08);
  --htm-shadow-hover:  0 10px 40px rgba(26,107,175,.15);
  --htm-transition:    .25s cubic-bezier(.4,0,.2,1);
  --htm-font:          inherit;
}

/* ── Wrapper ── */
.htm-treatments-wrap {
  font-family: var(--htm-font);
  box-sizing: border-box;
}

/* ── Filter Tabs ── */
.htm-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
  justify-content: flex-start;
}

.htm-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  background: var(--htm-white);
  color: var(--htm-text);
  border: 1.5px solid var(--htm-border);
  border-radius: 50px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .02em;
  transition: all var(--htm-transition);
  white-space: nowrap;
  line-height: 1;
}

.htm-tab-btn:hover {
  background: var(--htm-secondary);
  border-color: var(--htm-primary);
  color: var(--htm-primary);
}

.htm-tab-btn.active {
  background: var(--htm-primary);
  border-color: var(--htm-primary);
  color: var(--htm-white);
  box-shadow: 0 4px 14px rgba(26,107,175,.3);
}

/* Tab icons (Dashicons / FA icon in filter button) */
.htm-tab-icon {
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

/* Dashicons inside buttons */
.htm-tab-btn .dashicons {
  width: 16px;
  height: 16px;
  font-size: 16px;
  line-height: 1;
  vertical-align: middle;
}

/* ── Grid ── */
.htm-grid {
  display: grid;
  gap: 24px;
}

.htm-grid.htm-grid-cols-1 { grid-template-columns: 1fr; }
.htm-grid.htm-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.htm-grid.htm-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.htm-grid.htm-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .htm-grid.htm-grid-cols-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .htm-grid.htm-grid-cols-3,
  .htm-grid.htm-grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .htm-grid,
  .htm-grid.htm-grid-cols-2,
  .htm-grid.htm-grid-cols-3,
  .htm-grid.htm-grid-cols-4 { grid-template-columns: 1fr; }
  .htm-filter-tabs { gap: 6px; }
  .htm-tab-btn { padding: 8px 14px; font-size: 13px; }
}

/* ── Card ── */
.htm-card {
  background: var(--htm-white);
  border-radius: var(--htm-radius);
  box-shadow: var(--htm-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--htm-transition), box-shadow var(--htm-transition);
}

.htm-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--htm-shadow-hover);
}

/* Card image */
.htm-card-image {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--htm-secondary);
}

.htm-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--htm-transition);
}

.htm-card:hover .htm-card-image img {
  transform: scale(1.04);
}

/* Overlay slot */
.htm-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
}

/* Badge */
.htm-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--htm-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  z-index: 2;
  line-height: 1.4;
}

/* Card body */
.htm-card-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

/* Card icon */
.htm-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--htm-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--htm-primary);
  font-size: 20px;
  flex-shrink: 0;
}

/* Title */
.htm-card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--htm-text);
  line-height: 1.35;
}

/* Subtitle */
.htm-card-subtitle {
  margin: 0;
  font-size: 13.5px;
  color: var(--htm-text-muted);
  line-height: 1.55;
}

/* Key Points */
.htm-keypoints {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.htm-keypoint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: var(--htm-secondary);
  border-radius: 7px;
  font-size: 13px;
}

.htm-kp-icon {
  color: var(--htm-primary);
  font-size: 15px;
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}

.htm-kp-label {
  color: var(--htm-text-muted);
  flex: 1;
  font-size: 12.5px;
}

.htm-kp-value {
  color: var(--htm-text);
  font-weight: 600;
  font-size: 12.5px;
  text-align: right;
}

/* ── Action Buttons ── */
.htm-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 10px;
}

.htm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--htm-transition);
  cursor: pointer;
  border: 1.5px solid transparent;
  white-space: nowrap;
  flex: 1;
  text-align: center;
}

.htm-btn-primary {
  background: var(--htm-primary);
  color: #fff;
  border-color: var(--htm-primary);
}

.htm-btn-primary:hover {
  background: var(--htm-primary-dark);
  border-color: var(--htm-primary-dark);
  color: #fff;
  transform: translateY(-1px);
}

.htm-btn-secondary {
  background: transparent;
  color: var(--htm-primary);
  border-color: var(--htm-primary);
}

.htm-btn-secondary:hover {
  background: var(--htm-primary);
  color: #fff;
}

.htm-btn-ghost {
  background: transparent;
  color: var(--htm-primary);
  border-color: transparent;
  padding-left: 0;
  padding-right: 0;
  flex: initial;
}

.htm-btn-ghost:hover {
  color: var(--htm-primary-dark);
  text-decoration: underline;
}

/* ── No results ── */
.htm-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--htm-text-muted);
  font-size: 15px;
}

/* ── Card filter animation ── */
.htm-card.htm-hiding {
  animation: htmFadeOut .2s forwards;
}

.htm-card.htm-showing {
  animation: htmFadeIn .3s forwards;
}

@keyframes htmFadeOut {
  to { opacity: 0; transform: translateY(6px) scale(.97); }
}

@keyframes htmFadeIn {
  from { opacity: 0; transform: translateY(6px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}


/* ── Loading state ── */
.htm-grid.htm-loading {
  opacity: .5;
  pointer-events: none;
  transition: opacity .2s;
}

/* ── Swiper / Carousel overrides ── */
.htm-layout-carousel {
  position: relative;
}

.htm-swiper {
  width: 100%;
  padding-bottom: 52px !important;
  overflow: hidden;
}

.htm-swiper .swiper-wrapper {
  align-items: stretch;
}

.htm-swiper .swiper-slide {
  height: auto;
  box-sizing: border-box;
}

.htm-swiper .htm-card {
  height: 100%;
}

/* Navigation buttons */
.htm-swiper .swiper-button-prev,
.htm-swiper .swiper-button-next {
  color: var(--htm-primary);
  background: var(--htm-white);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  box-shadow: 0 3px 16px rgba(0,0,0,.15);
  top: 38%;
}

.htm-swiper .swiper-button-prev::after,
.htm-swiper .swiper-button-next::after {
  font-size: 14px;
  font-weight: 900;
}

.htm-swiper .swiper-button-disabled {
  opacity: 0.3;
}

/* Pagination dots */
.htm-swiper .swiper-pagination {
  bottom: 8px;
}

.htm-swiper .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: var(--htm-border);
  opacity: 1;
  transition: background .2s, width .2s;
}

.htm-swiper .swiper-pagination-bullet-active {
  background: var(--htm-primary);
  width: 22px;
  border-radius: 4px;
}
