/* ================================================
   Affiliate Coupons & Deals Plugin — Styles
   Primary Color: #BA8127 (Gold)
   ================================================ */

/* ---- CARD ---- */
.ac-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 2px dashed #e0e0e0;
    border-radius: 14px;
    padding: 18px 20px;
    margin: 18px 0;
    box-shadow: 0 3px 16px rgba(0,0,0,.07);
    gap: 14px;
    transition: box-shadow .2s, border-color .2s;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.ac-card:hover {
    box-shadow: 0 6px 28px rgba(0,0,0,.12);
    border-color: #BA8127;
}
.ac-card-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}
.ac-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
    flex-shrink: 0;
    background: #fafafa;
    padding: 4px;
}
.ac-logo-placeholder {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: #fdf8f0;
    border-radius: 10px;
    border: 1px solid #e8d5b0;
    flex-shrink: 0;
}
.ac-card-info { min-width: 0; }
.ac-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 4px;
    line-height: 1.3;
}
.ac-card-desc {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ac-card-expiry {
    font-size: 11px;
    color: #BA8127;
    font-weight: 600;
}

/* ---- RIGHT SIDE ---- */
.ac-card-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}
.ac-discount-badge {
    background: linear-gradient(135deg, #BA8127, #d4a045);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: .5px;
}
.ac-reveal-btn {
    background: linear-gradient(135deg, #BA8127 0%, #9a6a1e 100%);
    color: #fff;
    border: none;
    padding: 11px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: 0 3px 12px rgba(186,129,39,.35);
}
.ac-reveal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(186,129,39,.5);
}
.ac-reveal-btn:active { transform: translateY(0); }
.ac-btn-scissors { font-size: 16px; }

.ac-code-preview {
    font-size: 12px;
    color: #999;
    letter-spacing: 1px;
    border: 1px dashed #ddd;
    padding: 3px 10px;
    border-radius: 5px;
    background: #fafafa;
}
.ac-deal-tag {
    font-size: 11px;
    color: #27ae60;
    font-weight: 700;
    background: #eafaf1;
    padding: 3px 10px;
    border-radius: 20px;
}

/* ---- MODAL OVERLAY ---- */
.ac-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(4px);
}
.ac-modal-overlay.ac-open {
    display: flex;
    animation: acFadeIn .25s ease;
}
@keyframes acFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ---- MODAL BOX ---- */
.ac-modal {
    background: #fff;
    border-radius: 20px;
    padding: 36px 32px 28px;
    max-width: 480px;
    width: 100%;
    position: relative;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0,0,0,.25);
    animation: acSlideUp .3s cubic-bezier(.34,1.56,.64,1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
@keyframes acSlideUp {
    from { transform: translateY(40px) scale(.95); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}
.ac-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: #f5f5f5;
    border: none;
    font-size: 22px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background .2s;
}
.ac-modal-close:hover { background: #f5ecd9; color: #BA8127; }

.ac-modal-logo {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    margin-bottom: 14px;
    padding: 4px;
}
.ac-modal-discount {
    display: inline-block;
    background: linear-gradient(135deg, #BA8127, #9a6a1e);
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    padding: 6px 20px;
    border-radius: 30px;
    margin-bottom: 12px;
    letter-spacing: .5px;
}
.ac-modal-title {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0 0 10px;
    line-height: 1.3;
}
.ac-modal-desc {
    font-size: 14px;
    color: #555;
    margin-bottom: 14px;
    line-height: 1.6;
}
.ac-modal-expiry {
    font-size: 13px;
    color: #BA8127;
    margin-bottom: 20px;
    background: #fdf8f0;
    padding: 7px 14px;
    border-radius: 8px;
    display: inline-block;
}

/* ---- CODE BOX ---- */
.ac-modal-code-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fdf8f0;
    border: 2px dashed #BA8127;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    justify-content: center;
}
.ac-modal-code {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 4px;
    color: #BA8127;
    font-family: 'Courier New', monospace;
    flex: 1;
    text-align: center;
    min-width: 100px;
}
.ac-copy-btn {
    background: #1a1a2e;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s;
    white-space: nowrap;
}
.ac-copy-btn:hover { background: #BA8127; transform: scale(1.04); }
.ac-copy-btn.ac-copied { background: #27ae60; }

.ac-copied-msg {
    display: none;
    color: #27ae60;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 10px;
    animation: acFadeIn .3s;
}
.ac-copied-msg.ac-show { display: block; }

.ac-deal-info {
    background: #eafaf1;
    color: #27ae60;
    font-weight: 700;
    font-size: 14px;
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 16px;
}

/* ---- SHOP BUTTON ---- */
.ac-shop-btn {
    display: block;
    background: linear-gradient(135deg, #BA8127 0%, #9a6a1e 100%);
    color: #fff !important;
    text-decoration: none !important;
    font-size: 16px;
    font-weight: 800;
    padding: 15px 20px;
    border-radius: 10px;
    margin: 12px 0 10px;
    box-shadow: 0 4px 16px rgba(186,129,39,.4);
    transition: transform .15s, box-shadow .15s;
}
.ac-shop-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(186,129,39,.55);
    color: #fff !important;
}

.ac-modal-note {
    font-size: 11px;
    color: #aaa;
    margin-top: 8px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
    .ac-card { flex-direction: column; align-items: flex-start; }
    .ac-card-right { width: 100%; flex-direction: row; flex-wrap: wrap; justify-content: space-between; }
    .ac-reveal-btn { flex: 1; justify-content: center; }
    .ac-modal { padding: 28px 18px 22px; }
    .ac-modal-code { font-size: 18px; letter-spacing: 2px; }
    .ac-modal-code-wrap { flex-direction: column; }
    .ac-copy-btn { width: 100%; text-align: center; }
}
