/* ============================================
   Clearance Product Confirmation Modal
   All classes prefixed with clr- to avoid conflicts
   ============================================ */

/* Modal overlay & dialog */
#clearanceModal .modal-dialog {
  max-width: 520px;
  margin: 30px auto;
}

#clearanceModal .modal-content {
  border-radius: 12px;
  border: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

/* Header */
.clr-modal-header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.clr-modal-title {
  font-size: 17px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.3;
}

/* Close button — matches cart modal (.btn-close with SVG) */
.clr-modal-header .btn-close {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: .625rem;
  background-color: rgb(230 232 234 / 60%);
  background-image: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  opacity: 1;
  transition: background-color 0.15s;
}

.clr-modal-header .btn-close:hover {
  background-color: rgb(230 232 234 / 90%);
}

.clr-modal-header .btn-close svg {
  width: 12px;
  height: 13px;
}

.clr-modal-header .btn-close svg path {
  fill: #003459;
}

/* Body */
.clr-modal-body {
  padding: 20px;
}

/* Description text */
.clr-description {
  font-size: 14px;
  line-height: 1.6;
  color: #4b5563;
  margin-bottom: 16px;
}

/* ---- Image Carousel ---- */
.clr-carousel-wrap {
  position: relative;
  margin-bottom: 16px;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f4f6;
}

.clr-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 460px;
}

.clr-slide {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.clr-slide-active {
  display: flex;
}

.clr-slide-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-in;
}

/* Nav arrows */
.clr-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: #333;
  padding: 0;
  transition: background 0.15s, box-shadow 0.15s;
}

.clr-nav:hover {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.clr-nav-prev { left: 10px; }
.clr-nav-next { right: 10px; }

.clr-nav svg {
  width: 20px;
  height: 20px;
}

/* Image counter badge */
.clr-counter {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 10px;
  z-index: 2;
  pointer-events: none;
}

/* No images fallback */
.clr-no-images {
  text-align: center;
  padding: 40px 20px;
  color: #9ca3af;
  font-size: 14px;
}

/* ---- Clearance Reason Block ---- */
.clr-attribute {
  background: #fef9e7;
  border: 1px solid #f5c518;
  border-radius: 8px;
  padding: 14px 16px;
}

.clr-attribute-label {
  font-size: 12px;
  font-weight: 600;
  color: #92700c;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}

.clr-attribute-text {
  font-size: 15px;
  color: #6b5306;
  line-height: 1.5;
  font-weight: 500;
}

/* ---- Footer / Confirm Button ---- */
.clr-modal-footer {
  padding: 16px 20px 20px;
}

.clr-btn-confirm {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 54px;
  padding: 12px 32px;
  font-size: 16px;
  font-weight: 400;
  text-transform: uppercase;
  border: 2px solid transparent;
  border-radius: 0;
  text-align: center;
  cursor: not-allowed;
  transition: all 0.3s;
}

.clr-btn-confirm[disabled] {
  background: #d1d5db;
  color: #6b7280;
}

.clr-btn-confirm.clr-btn-ready {
  background: #000;
  color: #fff;
  cursor: pointer;
}

.clr-btn-confirm.clr-btn-ready:hover {
  background: #fff;
  color: #000;
  border-color: #000;
}

/* ---- Image Zoom Overlay ---- */
.clr-zoom-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.clr-zoom-overlay.clr-zoom-visible {
  opacity: 1;
}

.clr-zoom-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: .625rem;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #fff;
  z-index: 2;
  transition: background 0.15s;
}

.clr-zoom-close:hover {
  background: rgba(255, 255, 255, 0.35);
}

.clr-zoom-close svg path {
  fill: #fff;
}

.clr-zoom-img {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
  pointer-events: none;
}

/* ---- Mobile Responsive ---- */
@media (max-width: 575px) {
  #clearanceModal .modal-dialog {
    margin: 10px;
    max-width: none;
  }

  .clr-carousel {
    aspect-ratio: 4 / 3;
  }

  .clr-modal-header {
    padding: 14px 16px;
  }

  .clr-modal-title {
    font-size: 15px;
  }

  .clr-modal-body {
    padding: 16px;
  }

  .clr-description {
    font-size: 13px;
    margin-bottom: 12px;
  }

  .clr-nav {
    width: 30px;
    height: 30px;
  }

  .clr-nav svg {
    width: 16px;
    height: 16px;
  }

  .clr-nav-prev { left: 6px; }
  .clr-nav-next { right: 6px; }

  .clr-attribute {
    padding: 12px 14px;
  }

  .clr-attribute-label {
    font-size: 11px;
  }

  .clr-attribute-text {
    font-size: 14px;
  }

  .clr-modal-footer {
    padding: 12px 16px 16px;
  }

  .clr-btn-confirm {
    height: 48px;
    padding: 10px 20px;
    font-size: 15px;
  }

  .clr-zoom-close {
    top: 10px;
    right: 10px;
  }
}
