/* ===================================================
   Coupon Box Plugin — Public Styles
   =================================================== */

.cbp-wrapper {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 20px 0;
}

/* ── Device Visibility ── */
.cbp-show-mobile  { display: none; }
.cbp-show-desktop { display: block; }

@media (max-width: 768px) {
    .cbp-show-mobile  { display: block; }
    .cbp-show-desktop { display: none; }
}

/* Cards that show on BOTH always show */
.cbp-show-mobile.cbp-show-desktop {
    display: block !important;
}

/* ── Card ── */
.cbp-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 14px rgba(0,0,0,0.08);
    border: 1.5px solid #eee;
    overflow: hidden;
    position: relative;
    transition: box-shadow 0.25s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.cbp-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.13);
}

/* ── Ribbon ── */
.cbp-ribbon {
    position: absolute;
    top: 0;
    left: 0;
    background: #fff8e1;
    color: #f57f17;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 12px;
    border-bottom-right-radius: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 1;
}

/* ── Inner layout ── */
.cbp-inner {
    display: flex;
    align-items: center;
    padding: 18px 16px 16px 16px;
    gap: 14px;
    flex-wrap: wrap;
}

/* ── Stamp icon ── */
.cbp-stamp {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    margin-top: 6px;
    background: color-mix(in srgb, var(--cbp-color) 15%, white);
    color: var(--cbp-color);
}

/* ── Info ── */
.cbp-info {
    flex: 1;
    min-width: 140px;
}

.cbp-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1.35;
}

/* ── Code ── */
.cbp-code-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cbp-code {
    display: inline-block;
    background: #f4f6f8;
    border: 2px dashed #b0bec5;
    border-radius: 7px;
    padding: 5px 14px;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 3px;
    color: #263238;
    font-family: 'Courier New', Courier, monospace;
    cursor: pointer;
    user-select: all;
    transition: background 0.2s, border-color 0.2s;
}

.cbp-code:hover {
    background: #e3ecf5;
    border-color: var(--cbp-color);
}

.cbp-copy-label {
    font-size: 11px;
    color: #90a4ae;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cbp-deal-badge {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.3px;
}

/* ── Action Button ── */
.cbp-action {
    flex-shrink: 0;
}

.cbp-btn {
    display: inline-block;
    padding: 11px 22px;
    border-radius: 8px;
    color: #fff !important;
    font-weight: 800;
    font-size: 13px;
    text-decoration: none !important;
    letter-spacing: 0.5px;
    cursor: pointer;
    background: var(--cbp-color);
    border: none;
    transition: opacity 0.2s, transform 0.15s;
    white-space: nowrap;
}

.cbp-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    color: #fff !important;
    text-decoration: none !important;
}

/* ── Copy Toast ── */
.cbp-copy-toast {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: #263238;
    color: #fff;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
    z-index: 10;
}

.cbp-copy-toast.cbp-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Mobile responsive ── */
@media (max-width: 500px) {
    .cbp-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .cbp-stamp { margin-top: 12px; }
    .cbp-action { width: 100%; }
    .cbp-btn { display: block; text-align: center; width: 100%; padding: 12px; }
    .cbp-title { font-size: 14px; }
}
