/**
 * 더바붐샵 마이페이지 숏코드 전용 스타일
 */

/* 숏코드 컨테이너 */
.vavoom-shortcode-container {
  margin: 20px 0;
}

.vavoom-shortcode-container[data-theme="compact"] {
  padding: 15px;
}

.vavoom-shortcode-container[data-theme="mobile"] {
  padding: 10px;
}

.vavoom-shortcode-container[data-theme="mobile"] .vavoom-tab {
  min-width: 60px;
  padding: 6px 10px;
  font-size: 11px;
}

/* 로그인 필요 메시지 */
.vavoom-login-required {
  text-align: center;
  padding: 40px 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.vavoom-login-required .button {
  margin-top: 15px;
  padding: 10px 20px;
  background: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  display: inline-block;
}

/* 사용자 정보 위젯 */
.vavoom-user-info-widget {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
}

.vavoom-user-info-widget p {
  margin: 0 0 10px 0;
}

/* 포인트 위젯 */
.vavoom-points-widget {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
}

.vavoom-point-balance {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.balance-label {
  font-weight: 600;
  color: #495057;
}

.balance-amount {
  font-size: 20px;
  font-weight: bold;
  color: #28a745;
}

.vavoom-point-history-widget {
  border-top: 1px solid #e9ecef;
  padding-top: 15px;
}

.point-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f8f9fa;
}

.point-item:last-child {
  border-bottom: none;
}

.point-desc {
  color: #495057;
  font-size: 14px;
}

.point-amount {
  font-weight: 600;
  font-size: 14px;
}

.point-amount.positive {
  color: #28a745;
}

.point-amount.negative {
  color: #dc3545;
}

/* 쿠폰 컨테이너 */
.vavoom-coupons-container {
  margin: 20px 0;
}

.vavoom-coupons-container h2 {
  margin: 0 0 20px 0;
  color: #495057;
  font-size: 20px;
  font-weight: 600;
}

/* 대형 화면에서 최대 너비 제한 */
@media (min-width: 1024px) {
  .vavoom-coupons-list.horizontal {
    max-width: 1000px;
  }
}

/* 가로형 쿠폰 리스트 - 2열 배치 */
.vavoom-coupons-list.horizontal {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

/* 가로형 쿠폰 카드 - 높이 축소 */
.vavoom-coupon-card.horizontal {
  display: flex;
  align-items: stretch;
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-height: 100px;
  max-height: 120px;
}

.vavoom-coupon-card.horizontal:hover {
  border-color: #007bff;
  box-shadow: 0 4px 16px rgba(0, 123, 255, 0.15);
  transform: translateY(-2px);
}

/* 상태별 스타일 */
.vavoom-coupon-card.status-available {
  border-left: 4px solid #28a745;
}

.vavoom-coupon-card.status-expiring {
  border-left: 4px solid #ffc107;
  background: linear-gradient(90deg, #fff8e1 0%, white 10%);
}

.vavoom-coupon-card.status-expired {
  border-left: 4px solid #dc3545;
  opacity: 0.7;
  background: #f8f9fa;
}

/* 왼쪽 메인 정보 - 레이아웃 개선 */
.coupon-main-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.coupon-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.coupon-description {
  font-size: 14px;
  font-weight: 600;
  color: #495057;
  line-height: 1.3;
  flex: 1;
}

.coupon-status {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.coupon-status.status-available {
  background: #d4edda;
  color: #155724;
}

.coupon-status.status-expiring {
  background: #fff3cd;
  color: #856404;
}

.coupon-status.status-expired {
  background: #f8d7da;
  color: #721c24;
}

/* 하단 코드+금액 영역 */
.coupon-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.coupon-code {
  font-family: "Monaco", "Menlo", "Consolas", monospace;
  font-size: 13px;
  font-weight: 700;
  color: #495057;
  background: #f8f9fa;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #e9ecef;
  flex-shrink: 0;
}

.coupon-amount {
  font-size: 18px;
  font-weight: 700;
  color: #007bff;
  white-space: nowrap;
}

/* WooCommerce 가격 태그 스타일링 */
.coupon-amount .woocommerce-Price-amount,
.condition-tag .woocommerce-Price-amount {
  font-weight: inherit;
  color: inherit;
}

.coupon-amount .woocommerce-Price-currencySymbol,
.condition-tag .woocommerce-Price-currencySymbol {
  font-weight: inherit;
}

/* 오른쪽 조건 태그 - 컴팩트하게 */
.coupon-conditions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  min-width: 120px;
  max-width: 160px;
}

.condition-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

.condition-tag {
  font-size: 10px;
  font-weight: 500;
  padding: 3px 6px;
  background: #e9ecef;
  color: #495057;
  border-radius: 3px;
  white-space: nowrap;
  line-height: 1.2;
}

.expiry-info .expiry-tag {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 6px;
  background: #e3f2fd;
  color: #1565c0;
  border-radius: 3px;
  white-space: nowrap;
}

.benefit-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.benefit-tag.free-shipping {
  background: #d1ecf1;
  color: #0c5460;
}

/* 쿠폰 위젯 (기존 유지) */
.vavoom-coupons-widget {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.vavoom-coupons-widget.layout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.vavoom-coupons-widget.layout-compact .coupon-item {
  padding: 10px;
  flex-direction: row;
  justify-content: space-between;
}

.coupon-item {
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: all 0.3s ease;
}

.coupon-item:hover {
  border-color: #007bff;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.coupon-item.status-expired {
  opacity: 0.6;
  border-color: #dc3545;
}

.coupon-expires {
  font-size: 12px;
  color: #6c757d;
  margin-bottom: 10px;
}

.copy-coupon {
  background: #28a745;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.3s ease;
}

.copy-coupon:hover {
  background: #218838;
}

/* 대시보드 위젯 */
.vavoom-dashboard-widget {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 25px;
}

.welcome-message {
  text-align: center;
  margin-bottom: 20px;
}

.welcome-message h3 {
  margin: 0;
  color: #495057;
  font-size: 18px;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.stat-item {
  text-align: center;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.stat-value {
  display: block;
  font-size: 18px;
  font-weight: bold;
  color: #007bff;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 12px;
  color: #6c757d;
  text-transform: uppercase;
}

.recent-orders-summary h4 {
  margin: 0 0 15px 0;
  color: #495057;
  font-size: 16px;
}

.order-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f8f9fa;
}

.order-summary:last-child {
  border-bottom: none;
}

.order-info {
  color: #495057;
  font-size: 14px;
}

.order-total {
  font-weight: 600;
  color: #007bff;
}

/* 주문 상태 위젯 */
.vavoom-order-status-widget,
.vavoom-order-count {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
}

.total-orders {
  font-size: 18px;
  font-weight: bold;
  color: #495057;
  margin-bottom: 10px;
}

.status-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.status-item {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.status-item.status-pending {
  background: #fff3cd;
  color: #856404;
}

.status-item.status-processing {
  background: #cce5ff;
  color: #004085;
}

.status-item.status-shipped {
  background: #d1ecf1;
  color: #0c5460;
}

.status-item.status-completed {
  background: #d4edda;
  color: #155724;
}

/* 최근 주문 위젯 */
.vavoom-recent-orders-widget {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
}

.vavoom-recent-orders-widget .order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f8f9fa;
}

.vavoom-recent-orders-widget .order-item:last-child {
  border-bottom: none;
}

.order-number {
  font-weight: 600;
  color: #495057;
}

.order-date {
  color: #6c757d;
  font-size: 14px;
}

.order-total {
  font-weight: 600;
  color: #007bff;
}

/* 에러 및 알림 메시지 */
.vavoom-error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 12px 15px;
  border-radius: 6px;
  font-size: 14px;
  margin: 10px 0;
}

.vavoom-notice {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
  padding: 12px 15px;
  border-radius: 6px;
  font-size: 14px;
  margin: 10px 0;
}

.vavoom-success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 12px 15px;
  border-radius: 6px;
  font-size: 14px;
  margin: 10px 0;
}

/* 기본 컨텐츠 스타일 */
.vavoom-basic-content {
  padding: 30px 20px;
  text-align: center;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.vavoom-basic-content h3 {
  margin: 0 0 15px 0;
  color: #495057;
  font-size: 18px;
}

.vavoom-basic-content p {
  margin: 0;
  color: #6c757d;
  font-size: 14px;
  line-height: 1.5;
}

/* 빈 상태 스타일 */
.vavoom-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 2px dashed #dee2e6;
}

.vavoom-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.7;
}

.vavoom-empty-state h3 {
  margin: 0 0 8px 0;
  color: #495057;
  font-size: 18px;
  font-weight: 600;
}

.vavoom-empty-state p {
  margin: 0;
  color: #6c757d;
  font-size: 14px;
}

.vavoom-no-coupons {
  text-align: center;
  padding: 20px;
  color: #6c757d;
  font-style: italic;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
  .vavoom-coupons-widget.layout-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .status-breakdown {
    flex-direction: column;
    gap: 5px;
  }

  .order-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .vavoom-recent-orders-widget .order-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  /* 가로형 쿠폰 카드 모바일 대응 */
  .vavoom-coupons-list.horizontal {
    grid-template-columns: 1fr;
  }

  .vavoom-coupon-card.horizontal {
    flex-direction: column;
    align-items: stretch;
    padding: 15px;
    gap: 12px;
    min-height: auto;
    max-height: none;
  }

  .coupon-main-info {
    text-align: left;
  }

  .coupon-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .coupon-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .coupon-conditions {
    align-items: flex-start;
    min-width: auto;
    max-width: none;
  }

  .condition-tags {
    justify-content: flex-start;
  }

  .coupon-code {
    font-size: 12px !important;
    align-self: flex-start;
  }

  .coupon-amount {
    font-size: 16px !important;
    align-self: flex-end;
  }

  .coupon-description {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .dashboard-stats {
    grid-template-columns: 1fr;
  }

  .vavoom-point-balance {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }

  /* 480px 이하에서 쿠폰 카드 추가 조정 */
  .vavoom-coupon-card.horizontal {
    padding: 12px;
    gap: 10px;
  }

  .coupon-header {
    gap: 4px;
  }

  .coupon-bottom {
    gap: 6px;
  }

  .coupon-code {
    font-size: 11px !important;
    padding: 3px 6px !important;
  }

  .coupon-amount {
    font-size: 15px !important;
  }

  .coupon-description {
    font-size: 12px;
  }

  .condition-tag,
  .expiry-tag {
    font-size: 9px;
    padding: 2px 4px;
  }

  .coupon-status {
    font-size: 10px;
    padding: 2px 4px;
  }
}
