﻿/* ============================================================
   Calbar Breadcrumbs Widget
   ============================================================ */

.calbar-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 18px;
  line-height: 1.4;
}

.calbar-breadcrumbs__link {
  color: #6786A3;
  text-decoration: none;
  transition: color 0.15s;
  font-family: Assistant;
}

.calbar-breadcrumbs__link:hover {
  color: #000000;
  text-decoration: none;
}

.calbar-breadcrumbs__separator {
  color: #6786A3;
  font-size: 12px;
  line-height: 1;
  user-select: none;
}

.calbar-breadcrumbs__current {
  font-family: Assistant;
  color: #0057D8 !important;
  font-weight: 400;
}

/* ============================================================
   Calbar Offer Filter Widget
   ============================================================ */

.calbar-offer-filter {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
}

/* ── Header: title + category tabs ── */
.calbar-of-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 15px;
}

h1.calbar-of-title {
  margin: 0;
  font-weight: 400;
  color: #000000;
  line-height: 44px;
}

h2.calbar-of-title {
  margin: 0;
  font-size: 34px !important;
  font-weight: 400;
  color: #000000;
  line-height: 44px;
}

.calbar-of-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}

.calbar-of-tab {
  background: none;
  border: none;
  padding: 6px 0 4px;
  font-size: 16px;
  color: #000000;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  font-weight: 400;
}

.calbar-of-tab + .calbar-of-tab::before {
  content: '|';
  padding: 0 10px;
  color: #6786A3;
  pointer-events: none;
}

.calbar-of-tab:hover,
.calbar-of-tab:focus,
.calbar-of-tab:active {
  box-shadow: none !important;
  color: #000000 !important;
}

.calbar-of-tab__text {
  position: relative;
}

.calbar-of-tab__text::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  background: #2563eb;
  opacity: 0;
  transition: opacity 0.15s;
}

.calbar-of-tab:hover .calbar-of-tab__text::after {
  opacity: 1;
}

.calbar-of-tab.is-active {
  font-weight: 700;
}

/* ── Featured mode: "View all" link ── */
.calbar-of-view-all {
  font-size: 18px;
  background: #0066FF;
  color: #ffffff;
  white-space: nowrap;
  font-weight: 400;
  transition: all 0.5s;
  margin-top: 20px;
  padding: 14px 28px;
  border-radius: 24px;
}

.calbar-of-view-all:hover,
.calbar-of-view-all:focus {
  background: #0000FF;
}

/* ── Controls: search + sort ── */
.calbar-of-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 15px;
}

.calbar-of-searchbar {
  display: flex;
  align-items: center;
  width: 100%;
  border: 1px solid #052B4E;
  border-radius: 20px;
  overflow: hidden;
  flex: 1;
  max-width: 450px;
}

.calbar-of-searchbar__icon {
  display: flex;
  align-items: center;
  color: #052B4E;
  padding-left: 16px;
  flex: 0 0 auto;
}

.calbar-of-searchbar__input {
  flex: 1 1 auto;
  border: 0 !important;
  outline: 0;
  background: transparent !important;
  color: #000000 !important;
  font: inherit;
  font-size: 16px !important;
  padding: 5px 12px !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.calbar-of-searchbar__input::placeholder {
  color: #000000;
}

.calbar-of-searchbar__input:focus {
  box-shadow: unset !important;
  outline: none !important;
}

.calbar-of-searchbar__button {
  flex: 0 0 auto;
  align-self: stretch;
  border: 0;
  background: #052B4E;
  color: #ffffff;
  font: inherit;
  font-size: 18px;
  padding: 0 34px;
  cursor: pointer;
  border-radius: 0;
  transition: all .15s ease;
}

.calbar-of-searchbar__button:hover  { background: #0066FF; }
.calbar-of-searchbar__button:active { background: #0066FF; }

.calbar-of-sort-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.calbar-of-sort-label {
  font-size: 16px;
  color: #000000;
}

.calbar-of-sort {
  border: 1.5px solid #355069;
  border-radius: 50px;
  padding: 6px 48px 6px 20px;
  font-size: 16px;
  color: #355069;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10' fill='none'%3E%3Cpath d='M1 1.5L7 7.5L13 1.5' stroke='%23052B4E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 18px center;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  min-width: 250px;
}

.calbar-of-sort:hover, .calbar-of-sort:focus {
  border-color: #355069;
  color: #355069 !important;
  box-shadow: none !important;
}

/* ── Loading overlay ── */
.calbar-of-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
  top: 120px;
}

.calbar-of-loading[hidden] {
  display: none;
}

/* ── Column grid helpers ── */
.calbar-cols-2 { grid-template-columns: repeat(2, 1fr); }
.calbar-cols-3 { grid-template-columns: repeat(3, 1fr); }
.calbar-cols-4 { grid-template-columns: repeat(4, 1fr); }
.calbar-cols-5 { grid-template-columns: repeat(5, 1fr); }

/* ── Offers grid ── */
.calbar-offers-grid {
  display: grid;
  gap: 24px;
  transition: opacity 0.2s;
  width: 100%;
  align-items: stretch;
}

/* Stretch Elementor loop-item wrappers to fill their grid cell */
.calbar-offers-grid > * {
  display: flex;
  flex-direction: column;
}
.calbar-offers-grid > * > .elementor {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.calbar-offers-grid .elementor > .e-con,
.calbar-offers-grid .elementor > .elementor-section.elementor-top-section {
  flex: 1;
}

/* ── Offer pagination ── */
.calbar-of-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.calbar-of-page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: none;
  background: none;
  color: #374151;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s;
  line-height: 1;
}

.calbar-of-page-btn:hover:not(:disabled):not(.active) {
  color: #111827;
}

.calbar-of-page-num.active {
  color: #2563eb;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: default;
}

.calbar-of-page-prev,
.calbar-of-page-next {
  color: #2563eb;
}

.calbar-of-page-prev:disabled,
.calbar-of-page-next:disabled {
  color: #d1d5db;
  cursor: default;
}

.calbar-of-page-ellipsis {
  padding: 0 4px;
  color: #9ca3af;
  font-size: 15px;
  line-height: 36px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .calbar-of-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .calbar-of-tabs {
    flex-wrap: wrap;
  }

  .calbar-of-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .calbar-of-searchbar {
    max-width: 100%;
  }

  .calbar-of-sort-wrap {
    justify-content: flex-end;
  }
}

@media (max-width: 480px) {
  .calbar-of-pagination .calbar-of-page-num:not(.active),
  .calbar-of-pagination .calbar-of-page-ellipsis {
    display: none;
  }
}

/* ============================================================
   Calbar Partner Filter Widget
   ============================================================ */

.calbar-partner-filter {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
}

/* ── Category tabs row ── */
.calbar-pf-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}

.calbar-pf-tabs__label {
  font-size: 16px;
  font-weight: 400;
  color: #000000;
  margin-right: 16px;
  white-space: nowrap;
}

.calbar-pf-tab {
  background: none;
  border: none;
  padding: 6px 0 4px;
  font-size: 16px;
  color: #000000;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  font-weight: 400;
}

.calbar-pf-tab + .calbar-pf-tab::before {
  content: '|';
  padding: 0 10px;
  color: #6786A3;
  pointer-events: none;
}

.calbar-pf-tab:hover,
.calbar-pf-tab:focus,
.calbar-pf-tab:active {
  box-shadow: none !important;
  color: #000000 !important;
}

.calbar-pf-tab__text {
  position: relative;
}

.calbar-pf-tab__text::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  background: #2563eb;
  opacity: 0;
  transition: opacity 0.15s;
}

.calbar-pf-tab:hover .calbar-pf-tab__text::after {
  opacity: 1;
}

.calbar-pf-tab.is-active {
  font-weight: 700;
}

/* ── Loading overlay ── */
.calbar-pf-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
  top: 80px;
}

.calbar-pf-loading[hidden] {
  display: none;
}

/* ── Partners grid ── */
.calbar-partners-grid {
  display: grid;
  gap: 24px;
  transition: opacity 0.2s;
  width: 100%;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .calbar-partner-filter .calbar-cols-5 { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
  .calbar-pf-tabs {
    flex-wrap: wrap;
  }

  .calbar-partner-filter .calbar-cols-4,
  .calbar-partner-filter .calbar-cols-5 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  .calbar-partner-filter .calbar-cols-3,
  .calbar-partner-filter .calbar-cols-4,
  .calbar-partner-filter .calbar-cols-5 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 400px) {
  .calbar-partner-filter .calbar-cols-2,
  .calbar-partner-filter .calbar-cols-3,
  .calbar-partner-filter .calbar-cols-4,
  .calbar-partner-filter .calbar-cols-5 { grid-template-columns: 1fr; }
}
