/* 쿠폰 커스텀 드롭다운 스타일 (피그마 디자인) */

/* 쿠폰 드롭다운 래퍼 */
.student-new .coupon-dropdown-wrapper {
  width: 100%;
  margin-top: 8px;
  position: relative;
}

.student-new .lecture-detail-coupon-dropdown-wrapper {
  margin-top: 0px;
}

.student-new .lecture-detail-coupon-dropdown-wrapper .no-coupon-message {
  margin-top: 0px;
}

/* 드롭다운이 열렸을 때 wrapper z-index 증가 */
.student-new .coupon-dropdown-wrapper:has(.coupon-dropdown-trigger.active) {
  z-index: 9998;
}

/* 드롭다운이 보이도록 강제 */
.student-new
  .coupon-dropdown-wrapper
  .coupon-dropdown-trigger.active
  + .coupon-dropdown-menu {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  transform: translateY(0) !important; /* 원위치 */
}

/* 쿠폰 드롭다운 트리거 버튼 */
.student-new .coupon-dropdown-trigger {
  width: 100%;
  height: 48px;
  padding: 12px 16px 12px 24px;
  gap: 6px;
  background: #191919;
  border: 1px solid #333333;
  border-radius: 4px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
}

.student-new .coupon-dropdown-trigger span {
  flex-grow: 1;
  font-family: 'Pretendard', sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 16px;
  line-height: 140%;
  letter-spacing: -0.03em;
  color: #ffffff;
  text-align: left;
}

.student-new .coupon-dropdown-trigger svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.student-new .coupon-dropdown-trigger svg path {
  stroke: #ffffff;
  stroke-width: 1.5px;
}

/* 활성화 상태 (드롭다운 열림) */
.student-new .coupon-dropdown-trigger.active {
  border: 1px solid #802fff !important;
  border-radius: 4px 4px 0 0 !important;
  border-bottom: 1px solid #802fff !important; /* 하단 테두리도 유지 */
  position: relative;
  z-index: 1001; /* 메뉴보다 높게 */
}

.student-new .coupon-dropdown-trigger.active svg {
  transform: rotate(180deg);
}

/* 쿠폰 드롭다운 메뉴 */
.student-new .coupon-dropdown-menu {
  position: absolute !important;
  top: 47px !important; /* 버튼과 1px 겹침 */
  left: 0 !important;
  width: 100% !important;
  background: #292929 !important;
  border-left: 1px solid #802fff !important;
  border-right: 1px solid #802fff !important;
  border-bottom: 1px solid #802fff !important;
  border-top: none !important; /* 상단 테두리 완전 제거 */
  border-radius: 0 0 4px 4px !important;
  z-index: 99999 !important; /* 최상위 z-index */
  max-height: 240px !important;
  overflow-y: auto !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3) !important; /* 그림자 강화 */
  min-height: 48px !important; /* 최소 높이 보장 */
  display: none !important; /* 기본 숨김 */
  visibility: hidden !important; /* 기본 숨김 */
  opacity: 0 !important; /* 기본 투명 */
  transform: translateY(-10px) !important; /* 초기 위치 */
  transition: all 0.3s ease !important; /* 애니메이션 */
}

/* 쿠폰 드롭다운 아이템 */
.student-new
  .coupon-dropdown-wrapper
  .coupon-dropdown-menu
  .coupon-dropdown-item {
  padding: 12px 32px !important;
  height: 48px !important;
  background: #292929 !important;
  font-family: 'Pretendard', sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 14px !important;
  line-height: 140%;
  letter-spacing: -0.03em;
  color: #999999 !important;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  transition: color 0.2s ease;
  border: 0 !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  outline: none !important;
  width: 100% !important;
  box-shadow: none !important;
}

/* 마지막 아이템 border-radius */
.student-new
  .coupon-dropdown-wrapper
  .coupon-dropdown-menu
  .coupon-dropdown-item:last-child {
  border-radius: 0 0 4px 4px !important;
  border: 0 !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

/* 호버 상태 */
.student-new
  .coupon-dropdown-wrapper
  .coupon-dropdown-menu
  .coupon-dropdown-item:hover {
  color: #802fff !important;
  background: #292929 !important;
  border: 0 !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

/* 선택된 상태 */
.student-new
  .coupon-dropdown-wrapper
  .coupon-dropdown-menu
  .coupon-dropdown-item.selected {
  color: #ffffff !important;
  background: #292929 !important;
  border: 0 !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

/* 쿠폰 없음 메시지 */
.student-new .no-coupon-message {
  width: 100%;
  height: 48px;
  padding: 12px 24px;
  background: #1a1a1a;
  border: 1px solid #333333;
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #999999;
  font-family: 'Pretendard', sans-serif;
  font-size: 16px;
  font-weight: 500;
  margin-top: 8px;
}

/* 기존 아코디언 스타일 유지 (필요시 사용) */
.student-new .coupon-accordion-wrapper {
  width: 100%;
  margin-top: 8px;
}

/* 쿠폰이 없을 때 비활성 버튼 */
.student-new .btn-coupon-disabled {
  width: 100%;
  height: 48px;
  padding: 12px 24px;
  background: #1a1a1a;
  border: 1px solid #333333;
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: not-allowed;
  opacity: 0.7;
  font-family: 'Pretendard', sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.03em;
}

.student-new .btn-coupon-disabled span {
  color: #999999;
}

/* 쿠폰 토글 버튼 */
.student-new .btn-coupon-accordion {
  width: 100%;
  height: 48px;
  padding: 12px 16px 12px 24px;
  gap: 6px;
  background: #191919;
  border: 1px solid #333333;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Pretendard', sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 16px;
  line-height: 140%;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.student-new .btn-coupon-accordion span {
  color: #ffffff;
}

.student-new .btn-coupon-accordion svg {
  width: 20px;
  height: 20px;
  color: #ffffff;
  transition: transform 0.2s ease;
}

/* 호버 상태 */
.student-new .btn-coupon-accordion:hover {
  background: #222222;
}

/* 활성화 상태 (열린 상태) */
.student-new .btn-coupon-accordion.active {
  background: #191919;
  border-color: #802fff;
  border-radius: 4px 4px 0 0;
  border-bottom: none;
}

/* 화살표 회전 */
.student-new .btn-coupon-accordion.active svg {
  transform: rotate(180deg);
}

/* 쿠폰 드롭다운 컨테이너 */
.student-new .coupon-list-dropdown {
  width: 100%;
  background: #292929;
  border: none;
  border-radius: 0 0 4px 4px;
  overflow: hidden;
  margin-top: 0;
}

.student-new .coupon-list-content {
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* 기존 쿠폰 아이템 스타일 제거됨 - .coupon-dropdown-item 사용 */

/* 강제로 모든 쿠폰 아이템의 border 제거 */
div[class*='coupon-dropdown-item'] {
  border: 0 !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

/* 더 강력한 규칙 */
*[onclick*='selectCouponItem'] {
  border: 0 !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

/* 최종 강제 규칙 */
.coupon-dropdown-menu > * {
  border: 0 !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

/* 애니메이션 효과 */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.student-new .coupon-list-dropdown {
  animation: slideDown 0.3s ease;
}

/* 반응형 - 모바일 */
@media (max-width: 768px) {
  .student-new .btn-coupon-accordion {
    padding: 10px 16px;
    font-size: 14px;
    height: 44px;
  }

  .student-new .coupon-item {
    padding: 12px 16px;
    font-size: 13px;
  }

  /* 모바일에서 쿠폰 드롭다운을 모달로 변경 */
  .student-new .coupon-dropdown-wrapper:has(.coupon-dropdown-trigger.active)::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
  }

  .student-new .coupon-dropdown-menu {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90% !important;
    max-width: 400px !important;
    max-height: 60vh !important;
    border-radius: 8px !important;
    z-index: 10000 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
  }

  /* active 상태일 때 모달 위치 유지 */
  .student-new
    .coupon-dropdown-wrapper
    .coupon-dropdown-trigger.active
    + .coupon-dropdown-menu {
    transform: translate(-50%, -50%) !important;
  }

  /* 쿠폰 드롭다운 아이템 모바일 조정 */
  .student-new
    .coupon-dropdown-wrapper
    .coupon-dropdown-menu
    .coupon-dropdown-item {
    padding: 14px 20px !important;
    font-size: 14px !important;
  }
}
