/* ── Available Offers Section ───────────────────────────────────────────── */

#ssh-coupon-section {
    margin: 0 0 28px;
}

.ssh-coupon-heading {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ssh-coupon-heading::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.ssh-coupon-loading {
    color: #888;
    font-size: 13px;
    padding: 6px 0;
}

/* ── Grid ────────────────────────────────────────────────────────────────── */

#ssh-coupon-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (max-width: 600px) {
    #ssh-coupon-list { grid-template-columns: 1fr; }
}

/* ── Coupon Card ─────────────────────────────────────────────────────────── */

.ssh-coupon-card {
    position: relative;
    display: flex;
    align-items: stretch;
    border-radius: 8px;
    overflow: hidden;
    border: 1.5px solid #c8ede9;
    background: #fff;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.ssh-coupon-card:hover {
    box-shadow: 0 2px 8px rgba(14,158,142,0.13);
}

.ssh-coupon-card.ssh-state-applied {
    border-color: #0e9e8e;
    background: #f0fdfb;
}

.ssh-coupon-card.ssh-state-disabled {
    border-color: #e5e7eb;
    background: #fafafa;
    opacity: 0.7;
}

/* left accent strip */
.ssh-coupon-card::before {
    content: '';
    width: 4px;
    background: #0e9e8e;
    flex-shrink: 0;
}

.ssh-coupon-card.ssh-state-disabled::before { background: #d1d5db; }
.ssh-coupon-card.ssh-state-applied::before  { background: #059d88; }

/* ── Inner layout ────────────────────────────────────────────────────────── */

.ssh-coupon-inner {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    gap: 10px;
    min-width: 0;
}

.ssh-coupon-body { flex: 1; min-width: 0; }

.ssh-coupon-code {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: #0e9e8e;
    font-family: monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ssh-state-disabled .ssh-coupon-code { color: #9ca3af; }
.ssh-state-applied  .ssh-coupon-code { color: #0a7a6e; }

.ssh-coupon-label {
    font-size: 11.5px;
    font-weight: 500;
    color: #374151;
    line-height: 1.4;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ssh-coupon-expiry {
    font-size: 10.5px;
    color: #9ca3af;
    margin-top: 2px;
}

.ssh-coupon-reason {
    font-size: 10.5px;
    color: #ef4444;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* applied tick */
.ssh-state-applied .ssh-coupon-code::before {
    content: '✓ ';
    color: #059d88;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.ssh-coupon-action { flex-shrink: 0; }

#ssh-coupon-section .ssh-btn {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    line-height: 1 !important;
    letter-spacing: 0.02em;
    transition: opacity 0.15s;
}

#ssh-coupon-section .ssh-btn-apply {
    color: #0e9e8e !important;
}

#ssh-coupon-section .ssh-btn-apply:hover { opacity: 0.7; }

#ssh-coupon-section .ssh-btn-remove {
    color: #dc2626 !important;
}

#ssh-coupon-section .ssh-btn-remove:hover { opacity: 0.7; }

#ssh-coupon-section .ssh-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.ssh-na {
    font-size: 11px;
    color: #d1d5db;
    font-style: italic;
}

/* ── Hidden overflow cards ───────────────────────────────────────────────── */

.ssh-coupon-card.ssh-hidden { display: none; }

/* ── View all toggle ─────────────────────────────────────────────────────── */

#ssh-coupon-toggle-row {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 2px;
}

#ssh-coupon-toggle {
    background: none;
    border: none;
    color: #0e9e8e;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 10px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

#ssh-coupon-toggle:hover { color: #0a7a6e; }

.ssh-no-offers {
    grid-column: 1 / -1;
    font-size: 13px;
    color: #9ca3af;
}

/* ── Bulk discount badge on cart row ─────────────────────────────────── */
.ssh-cart-bulk-badge {
  display: block;
  margin-top: 5px;
  background: #ecfdf5;
  color: #059669;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
  border: 1px solid #a7f3d0;
  width: fit-content;
}

/* ── Bulk qty locked display ─────────────────────────────────────────── */
.ssh-bulk-qty-locked {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 38px;
  padding: 0 14px;
  background: #f3f4f6;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  cursor: not-allowed;
}
