/* ========================================
   REQUEST LIST / CART (Durr Dental)
   ======================================== */

/* -- Header action icon -- */
.request-list-icon {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #005f8f;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.request-list-icon:hover {
  background: #004f78;
}

.request-list-icon .icon {
  width: 30px;
  height: 30px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.request-list-icon .icon svg {
  width: 30px;
  height: 30px;
}

.request-list-icon .badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--primary-500);
  color: var(--white);
  font-family: var(--font-family);
  font-size: 10px;
  font-weight: var(--fw-demi);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--white);
}

/* -- Request modal panel -- */
.request-list-sidebar {
  position: fixed;
  bottom: 30px;
  right: 28px;
  top: auto;
  width: 494px;
  max-width: calc(100vw - 64px);
  background: var(--white);
  z-index: 9999;
  box-shadow: 0 -8px 42px rgba(5, 22, 38, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px);
  transition: opacity 0.15s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.request-list-sidebar.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  max-height: min(70dvh, 560px);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-header h3 {
  color: var(--primary-500);
  font-family: var(--font-family);
  font-size: 20px;
  font-weight: var(--fw-book);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sidebar-info-icon {
  width: 20px;
  height: 20px;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: var(--fw-demi);
}

.close-sidebar {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--primary-950);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.close-sidebar:hover {
  color: var(--primary-950);
}

/* -- Items list -- */
.request-list-items {
  flex: 1;
  overflow-y: auto;
  padding: 6px 22px 8px;
}

.request-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
}

.request-item-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.request-item-thumb {
  width: 42px;
  height: 42px;
  border-radius: 4px;
  object-fit: cover;
  background: #eef3f7;
  flex-shrink: 0;
}

.request-item-thumb--placeholder {
  border: 1px solid var(--color-border);
}

.request-item-texts {
  min-width: 0;
  flex: 1;
}

.request-item-title {
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: var(--fw-book);
  color: var(--primary-950);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-remove-item {
  background: none;
  border: none;
  font-size: 14px;
  color: var(--secondary-100);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  flex-shrink: 0;
}

.btn-remove-item:hover {
  color: var(--primary-950);
}

.request-item-category {
  font-family: var(--font-family);
  font-size: 12px;
  color: var(--secondary-100);
  margin-top: 2px;
}

.request-item-price {
  font-family: var(--font-family);
  font-size: 11px;
  color: var(--secondary-100);
  font-weight: var(--fw-book);
  margin-top: 1px;
}

/* -- Sidebar footer -- */
.sidebar-footer {
  padding: 20px 22px 22px;
}

.btn-submit-request {
  display: block;
  width: fit-content;
  min-width: 220px;
  margin: 0 auto;
  padding: 13px 24px;
  background: var(--primary-500);
  color: var(--white);
  border: none;
  border-radius: 30px;
  font-family: var(--font-family);
  font-size: var(--text-xs);
  font-weight: var(--fw-demi);
  letter-spacing: 1.8px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-submit-request:hover {
  background: var(--primary-700);
}

/* -- Overlay -- */
.request-list-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 24, 43, 0.45);
  backdrop-filter: blur(4px);
  z-index: 250;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.request-list-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* -- Index modal -- */
.catalog-index {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(7, 28, 48, 0.58);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.catalog-index.open {
  opacity: 1;
  pointer-events: auto;
}

.index-modal {
  width: min(760px, calc(100vw - 64px));
  max-height: min(76vh, 640px);
  overflow-y: auto;
  padding: 20px 24px 22px;
  background: var(--white);
  box-shadow: 0 22px 48px rgba(5, 21, 36, 0.28);
}

.index-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dfe5ea;
}

.index-title {
  color: #007BAF;
  font-family: var(--font-family);
  font-size: 36px;
  line-height: 1;
  font-weight: var(--fw-light);
  margin: 0;
}

.index-subtitle {
  color: var(--secondary-500);
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: var(--fw-book);
  margin: 2px 0 0;
}

.close-index {
  background: none;
  border: none;
  color: var(--primary-950);
  font-size: 34px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.close-index:hover {
  color: var(--primary-500);
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-left: 14px;
  padding-right: 6px;
}

.index-card {
  padding: 14px 14px 12px;
  border: 1px solid #dfe5ea;
  border-radius: 0;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--white);
}

.index-card:hover {
  border-color: var(--primary-500);
  background: rgba(0, 187, 238, 0.04);
}

.index-card-title {
  color: #007BAF;
  font-family: var(--font-family);
  font-size: 24px;
  line-height: 1;
  font-weight: var(--fw-book);
  margin-bottom: 2px;
  text-transform: lowercase;
}

.index-card-title::first-letter {
  text-transform: uppercase;
}

.index-card-count {
  color: var(--secondary-100);
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: var(--fw-book);
}

/* -- Add-to-request toast -- */
.request-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.98);
  width: min(840px, calc(100vw - 24px));
  min-height: 98px;
  padding: 20px 26px;
  background: #f2f2f2;
  border: 1px solid #d4d9dd;
  box-shadow: 0 12px 24px rgba(5, 22, 38, 0.16);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.request-toast.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.request-toast__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--primary-500);
  color: var(--primary-500);
  font-family: var(--font-family);
  font-size: 24px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.request-toast__text {
  color: var(--primary-700);
  font-family: var(--font-family);
  font-size: 18px;
  font-weight: var(--fw-book);
  line-height: 1.05;
  flex: 1;
}

.request-toast__close {
  border: none;
  background: transparent;
  color: var(--primary-950);
  font-size: 44px;
  line-height: 1;
  padding: 0 6px;
  cursor: pointer;
}

.request-toast__close:hover {
  color: var(--primary-700);
}

@media (max-width: 768px) {
  .index-modal {
    width: calc(100vw - 24px);
    padding: 12px;
  }

  .index-grid {
    grid-template-columns: 1fr;
  }

  .request-toast {
    min-height: 74px;
    padding: 14px 12px;
    gap: 10px;
  }

  .request-toast__icon {
    width: 28px;
    height: 28px;
    font-size: 18px;
  }

  .request-toast__text {
    font-size: 18px;
    line-height: 1.2;
  }

  .request-toast__close {
    font-size: 34px;
    padding: 0 2px;
  }

  .request-list-sidebar {
    top: 7rem;
    bottom: auto;
    right: 16px;
    max-width: calc(100vw - 32px);
  }
}
