/**
 * Coupon Slider Styles
 * Styling for coupon tickets and Splide slider functionality
 */

/* =================================
   CART COUPON SECTION STYLING
   ================================= */
.coupon-section .section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--tp-gray-900);
  margin: 0 0 1rem 0;
}

/* --- Form nhập mã --- */
.coupon-form-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.coupon-form,
.clear-coupons-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0px;
}

.coupon-input-group {
  display: flex;
  gap: 0.75rem;
}

@media (max-width: 468px) {
  .coupon-input-group {
    flex-direction: column;
  }
}

.clear-coupons-section {
  display: flex;
  justify-content: center;
}

.coupon-input {
  flex-grow: 1;
  border: 1px solid var(--tp-gray-200);
  border-radius: var(--tp-radius);
  padding: 0.6rem 0.75rem;
  font-size: 1rem;
  transition: all 0.2s ease;
  height: 40px !important;
}

.coupon-input:focus {
  outline: none;
  border-color: var(--tp-secondary);
  box-shadow: 0 0 0 3px rgba(42, 126, 239, 0.1);
}

.coupon-button {
  border: none;
  background-color: var(--tp-primary);
  color: var(--white);
  font-weight: 500;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  min-width: 120px;
  height: 40px;
}

.coupon-button:hover {
  background-color: var(--tp-primary);
}

.clear-coupons-button {
  border: 1px solid var(--tp-gray-300);
  background-color: var(--tp-gray-100);
  color: var(--tp-gray-700);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.clear-coupons-button:hover {
  background-color: var(--tp-gray-200);
  border-color: var(--tp-gray-400);
}

@media (max-width: 468px) {
  .clear-coupons-button {
    width: 100%;
  }
}

/* --- Đường kẻ phân cách --- */
.separator {
  border: none;
  height: 2px;
  margin: 2rem 0;
  background: linear-gradient(90deg, 
    transparent 0%, 
    var(--tp-gray-400) 15%, 
    var(--tp-gray-600) 50%, 
    var(--tp-gray-400) 85%, 
    transparent 100%
  );
  position: relative;
  overflow: visible;
}

.separator::before {
  content: "✨";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--white);
  padding: 0 1rem;
  font-size: 1rem;
  color: var(--tp-primary);
}

.list-subtitle {
  font-weight: 600;
  color: var(--tp-gray-900);
  margin: 0 0 1rem 0;
}

/* =================================
   COUPON TICKETS GRID STYLING
   ================================= */

/* Grid layout for coupon tickets */
.coupon-tickets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1rem 0;
}
.coupon-ticket-wrapper {
  align-items: stretch;
  display: grid;
  width: 100%;
}

@media (max-width: 768px) {
  .coupon-tickets-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .coupon-tickets-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.no-coupons {
  text-align: center;
  color: var(--tp-gray-500);
  font-style: italic;
  padding: 2rem 0;
  margin: 0;
}

/* =================================
   COUPON TICKETS STYLING
   ================================= */

/* --- Style cho mỗi vé --- */
.coupon-ticket {
  display: flex;
  background-color: var(--white);
  border-radius: 5px;
  box-shadow: var(--tp-shadow-sm);
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Tạo 2 lỗ tròn cắt vé */
.coupon-ticket::before {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  background-color: white;
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

.coupon-ticket::before {
  left: -12px;
}

.coupon-ticket::after {
  right: -12px;
}

/* Phần cuống vé bên trái */
.ticket-stub {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  border-right: 2px dashed var(--tp-gray-200);
  background-color: #fceeec;
  color: var(--tp-primary);
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}

.ticket-stub.orange {
  background-color: rgba(249, 115, 22, 0.1);
  color: #f97316;
}

.ticket-stub svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Phần nội dung vé bên phải */
.ticket-content {
  padding: 1rem 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}
.ticket-content p {
  margin-bottom: 0px;
}
.ticket-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--tp-gray-900);
  margin-bottom: 0px;
}

.ticket-code {
  display: inline-block;
  background-color: var(--tp-gray-100);
  padding: 0.25rem 0.5rem;
  border-radius: 5px;
  color: var(--tp-gray-900);
  font-weight: 500;
  border: 1px dashed var(--tp-gray-300);
}

.ticket-expiry {
  font-size: 0.75rem;
  color: var(--tp-gray-500);
  margin-bottom: 0px;
}

/* =================================
   RESPONSIVE DESIGN
   ================================= */

@media (max-width: 768px) {
  /* ===== COUPON SECTION TABLET STYLES ===== */

  .coupon-form {
    gap: 0.75rem;
  }

  .ticket-content {
    padding: 1.25rem;
  }

  .ticket-title {
    font-size: 1.0625rem;
  }

  .ticket-expiry {
    font-size: 0.6875rem;
  }
}
