/* coupon layout */
ul.my-coupons > li {
    width: 30%;
    border: 1px solid #111111;
    padding: 12px;
    margin: 12px;
}
ul.my-coupons {
    display: flex;
    flex-wrap: wrap;
    gap: 5%;
}

.checkout-coupon-section {
    margin: 24px 0;
}

.checkout-coupon-section h3 {
    margin-bottom: 12px;
}

.coupon-card-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 6px;
    margin: 8px;
}

.coupon-card {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 14px;
    background: #fff;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    line-height: 1.1;
}

.coupon-info {
    display: flex;
    flex-direction: column;
}

.coupon-title {
    font-size: 12px;
}

.coupon-discount {
    font-size: 13px;
    color: #d63638;
}

.coupon-code {
    font-size: 12px;
    color: #666;
}
.coupon-info > code > p {
    margin-bottom: 0;
    line-height: 1.2;
}
.coupon-info > p {
    margin-bottom: 5px;
	  line-height: 1.2;
}

.apply-coupon-btn {
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.coupon-card.is-claimed {
    border: 2px solid #3ab54a;
    background: #f0fff4;
    position: relative;
}

.coupon-card.is-claimed::before {
    content: "取得しました";
    position: absolute;
    top: -10px;
    left: -10px;
    background: #3ab54a;
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
}

/* クーポン適用処理中のロード処理 */
.coupon-card.is-loading {
    opacity: 0.7;
    cursor: wait;
    position: relative;
    padding-right: 28px;
}

.coupon-card.is-loading::after {
    content: '';
    width: 35px;
    height: 35px;
    border: 2px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    animation: coupon-spin 0.8s linear infinite;    
}

/* クーポン取得ボックス */
.vv-coupon-claim-box {
  max-width: 520px;
  margin: 32px auto;
  padding: 24px;
  border-radius: 0;
  background: #ffffff;
  border: 1px solid #111111;
}

/* タイトル */
.vv-coupon-claim-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
}

/* 説明文 */
.vv-coupon-claim-desc {
  margin: 0 0 16px;
  font-size: 14px;
  color: #6b7280;
}

/* 入力エリア */
.vv-coupon-claim-field {
  display: flex;
  gap: 8px;
}

/* 入力欄 */
.vv-coupon-claim-form .vv-coupon-claim-field input[type="text"] {
  flex: 1;
  height: 44px;
  padding: 0 14px;
  font-size: 14px;
  border-radius: 0;
  border: 1px solid #d1d5db;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.vv-coupon-claim-field input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

/* ボタン */
.vv-coupon-claim-field button {
  height: 44px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: #111111;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s;
}

.vv-coupon-claim-field button:hover {
  background: #111111;
}

/* checkout画面のクーポン一覧開閉 */
.checkout-coupon-section {
  margin: 20px 0;
  border: 1px solid #eee;
  border-radius: 10px;
  background: #fafafa;
  overflow: hidden;
}

/* トグルボタン */
.vv-coupon-toggle {
  width: 100%;
  background: #fff;
  border: none;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.vv-coupon-toggle:hover {
  background: #f3f3f3;
}

.vv-toggle-icon {
  font-size: 18px;
  transition: transform 0.3s ease;
}

/* 開いた状態 */
.checkout-coupon-section.open .vv-toggle-icon {
  transform: rotate(45deg);
}

/* 開閉アニメーション */
.coupon-card-wrapper {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.checkout-coupon-section.open .coupon-card-wrapper {
  max-height: 1000px; /* 十分大きい値 */
  padding: 15px;
}

/* カード */
.coupon-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 8px;
  transition: 0.2s ease;
  cursor: pointer;
}

.coupon-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transform: translateY(-2px);
}


@keyframes coupon-spin {
    to { transform: rotate(360deg) translate(-50%, -50%); } 
}

/* sp layout */
@media screen and (max-width: 768px) {
    ul.my-coupons > li {
        width: 90%;
        border: 1px solid #111111;
        padding: 12px;
        margin: 12px;
    }
}