/* ═══════════════════════════════════════════════ */
/* Ulibka Price — Frontend Styles v3.0            */
/* Matching static-export/price.css design         */
/* ═══════════════════════════════════════════════ */

/* ── Wrap ── */
.ulpPriceWrap {
  --ulp-teal: var(--teal, #1cba9f);
  --ulp-teal-dark: var(--teal-dark, #16a085);
  --ulp-teal-light: var(--teal-light, #e8f8f5);
  --ulp-text: var(--text, #222);
  --ulp-text-mid: var(--text-mid, #444);
  --ulp-text-light: var(--text-light, #777);
  --ulp-white: var(--white, #fff);
  --ulp-gray-bg: var(--gray-bg, #f5f7fa);
  --ulp-gray-border: var(--gray-border, #e8edf2);
  --ulp-radius: var(--radius, 16px);
  --ulp-radius-lg: var(--radius-lg, 20px);
  --ulp-shadow-sm: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.06));
  --ulp-shadow-md: var(--shadow-md, 0 4px 20px rgba(0,0,0,0.08));
  font-family: 'Inter', 'Roboto', Arial, sans-serif;
}

/* ── Search & Filter Panel ── */
.ulpSearchPanel {
  background: var(--ulp-white);
  border-radius: var(--ulp-radius-lg);
  padding: 32px;
  box-shadow: var(--ulp-shadow-md);
  margin-bottom: 36px;
}

.ulpSearchRow {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.ulpSearchWrap {
  flex: 1;
  position: relative;
}

.ulpSearchInput {
  width: 100%;
  padding: 16px 52px 16px 52px;
  border: 2px solid var(--ulp-gray-border);
  border-radius: 50px;
  font-size: 16px;
  color: var(--ulp-text);
  background: var(--ulp-white);
  outline: none;
  transition: all 0.3s;
  font-family: inherit;
}

.ulpSearchInput::placeholder { color: #aab4c0; }

.ulpSearchInput:focus {
  border-color: var(--ulp-teal);
  box-shadow: 0 0 0 4px rgba(28,186,159,0.12);
}

.ulpSearchIcon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #aab4c0;
  pointer-events: none;
  transition: color 0.3s;
}

.ulpSearchInput:focus ~ .ulpSearchIcon { color: var(--ulp-teal); }

.ulpSearchClear {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ulp-gray-bg);
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--ulp-text-light);
  transition: all 0.2s;
  font-size: 18px;
  padding: 0;
}

.ulpSearchClear svg { width: 16px; height: 16px; }

.ulpSearchWrap.has-text .ulpSearchClear { display: flex; }
.ulpSearchClear:hover { background: #e0e0e0; color: var(--ulp-text); }

/* ── Result Info ── */
.ulpResultInfo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--ulp-text-light);
  margin-top: 16px;
}

.ulpResultCount {
  font-weight: 700;
  color: var(--ulp-teal);
  font-size: 15px;
}

/* ── Category Tabs ── */
.ulpCatTabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
}

.ulpCatTab {
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid var(--ulp-gray-border);
  background: var(--ulp-white);
  color: var(--ulp-text-mid);
  transition: all 0.25s;
  white-space: nowrap;
  font-family: inherit;
}

.ulpCatTab:hover {
  border-color: var(--ulp-teal);
  color: var(--ulp-teal);
}

.ulpCatTab.active {
  background: var(--ulp-teal);
  border-color: var(--ulp-teal);
  color: var(--ulp-white);
}

/* ── Render Area — Accordion ── */
.ulpRenderArea {
  display: flex;
  flex-direction: column;
}

/* Category Block (single accordion group) */
/* margin (not gap) — JS toggles renderArea's inline display between
   block/grid depending on layout style, which breaks flex "gap" */
.ulpCatBlock {
  background: var(--ulp-white);
  border-radius: var(--ulp-radius);
  overflow: hidden;
  box-shadow: var(--ulp-shadow-sm);
  transition: box-shadow 0.3s;
  margin-bottom: 16px;
}

.ulpCatBlock:last-child {
  margin-bottom: 0;
}

.ulpCatBlock:hover {
  box-shadow: var(--ulp-shadow-md);
}

/* Accordion Header */
.ulpCatHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 20px 24px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.2s;
  gap: 16px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ulp-text);
  background: var(--ulp-white);
  border: none;
  text-align: left;
  font-family: inherit;
  line-height: 1.4;
  position: relative;
}

.ulpCatHeader::after {
  content: '';
  display: block;
  width: 12px;
  height: 12px;
  border-right: 2.5px solid var(--ulp-text-light);
  border-bottom: 2.5px solid var(--ulp-text-light);
  transform: rotate(45deg);
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), border-color 0.3s;
}

.ulpCatBlock.active .ulpCatHeader::after {
  transform: rotate(-135deg);
  border-color: var(--ulp-teal);
}

.ulpCatHeader:hover { background: var(--ulp-teal-light); }

/* Accordion Content */
.ulpCatContent {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1);
}

.ulpCatBlock.active .ulpCatContent {
  max-height: 8000px;
}

/* ── Item Rows (price table rows) ── */
.ulpItemRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-top: 1px solid var(--ulp-gray-border);
  transition: background 0.15s;
  gap: 16px;
}

.ulpItemRow:hover { background: #f8fffe; }
.ulpItemRow.highlighted { background: #fffef0; }

.ulpItemName {
  flex: 1;
  font-size: 14px;
  color: var(--ulp-text-mid);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ulpItemPrice {
  font-size: 14px;
  font-weight: 700;
  color: var(--ulp-text);
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
}

.ulpBadge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  background: rgba(28,186,159,0.1);
  color: var(--ulp-teal);
  border-radius: 50px;
}

.ulpTooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ulp-gray-bg);
  color: var(--ulp-text-light);
  font-size: 11px;
  font-weight: 700;
  cursor: help;
  position: relative;
}

.ulpTooltipText {
  display: none;
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ulp-text);
  color: var(--ulp-white);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
  max-width: 250px;
  white-space: normal;
  z-index: 10;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.ulpTooltipText::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: var(--ulp-text) transparent transparent transparent;
}

.ulpTooltip:hover .ulpTooltipText { display: block; }

/* ── Doctors ── */
.ulpDoctors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  margin-top: 6px;
}

.ulpDoctorTag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: var(--ulp-gray-bg);
  border-radius: 50px;
  font-size: 12px;
  color: var(--ulp-text-mid);
  text-decoration: none;
  transition: all 0.2s;
}

.ulpDoctorTag:hover {
  background: var(--ulp-teal-light);
  color: var(--ulp-teal);
}

.ulpDoctorAvatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

/* ── No Results ── */
.ulpNoResults {
  display: none;
  text-align: center;
  padding: 60px 24px;
  background: var(--ulp-white);
  border-radius: var(--ulp-radius);
}

.ulpNoResultsIcon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  color: var(--ulp-gray-border);
  display: block;
}

.ulpNoResultsTitle {
  font-size: 20px;
  font-weight: 700;
  color: var(--ulp-text);
  margin-bottom: 8px;
}

.ulpNoResultsText {
  font-size: 14px;
  color: var(--ulp-text-light);
}

/* ── Empty state ── */
.ulpEmpty {
  text-align: center;
  padding: 60px 24px;
  background: var(--ulp-white, #fff);
  border-radius: 16px;
  font-size: 16px;
  color: #777;
}

/* ── Match highlighting ── */
.ulpMatch {
  background: rgba(28,186,159,0.15);
  padding: 1px 3px;
  border-radius: 3px;
}

/* ═══ Responsive ═══ */
@media (max-width: 768px) {
  .ulpSearchPanel { padding: 20px; }
  .ulpSearchRow { flex-direction: column; }
  .ulpCatTabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
  .ulpCatHeader { padding: 16px 18px; font-size: 15px; }
  .ulpItemRow { padding: 10px 16px; }
  .ulpItemName { font-size: 13px; }
  .ulpItemPrice { font-size: 13px; }
}
