/* Madika Ads — Admin Settings */

.madika-ads-wrap h1 { display:flex; align-items:center; gap:.5rem; font-size:1.6rem; }
.madika-ads-wrap h1 .dashicons { font-size:28px; width:28px; height:28px; }

.madika-ads-card {
    background: #1e1e2e;
    border: 1px solid #2a2a3d;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin: 1.5rem 0;
    color: #e2e8f0;
}
.madika-ads-card h2 { margin: 0; font-size: 1rem; color: #f8fafc; }
.madika-ads-card h3 { margin: 1rem 0 .5rem; font-size: .85rem; color: #94a3b8; text-transform: uppercase; letter-spacing: .05em; }

.madika-ads-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.madika-ads-field { margin-bottom: 1rem; }
.madika-ads-field label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .9rem; }
.madika-ads-field .description { font-weight: 400; color: #94a3b8; }

.madika-ads-field input[type="number"] {
    background: #0f0f1a;
    border: 1px solid #3b3b54;
    color: #e2e8f0;
    padding: .4rem .6rem;
    border-radius: 6px;
    width: 80px;
    font-size: .9rem;
}
.madika-ads-field textarea {
    background: #0f0f1a;
    border: 1px solid #3b3b54;
    color: #e2e8f0;
    border-radius: 6px;
    font-family: monospace;
    font-size: .85rem;
}
.madika-ads-field textarea:focus { border-color: #6366f1; outline: none; }

/* Toggle switch */
.madika-toggle { position: relative; display: inline-block; width: 48px; height: 26px; cursor: pointer; }
.madika-toggle input { opacity: 0; width: 0; height: 0; }
.madika-toggle-slider {
    position: absolute; inset: 0;
    background: #3b3b54;
    border-radius: 26px;
    transition: .3s;
}
.madika-toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px; height: 20px;
    left: 3px; bottom: 3px;
    background: #e2e8f0;
    border-radius: 50%;
    transition: .3s;
}
.madika-toggle input:checked + .madika-toggle-slider { background: #6366f1; }
.madika-toggle input:checked + .madika-toggle-slider::before { transform: translateX(22px); }

/* Preview */
.madika-ads-preview {
    background: #0f0f1a;
    border: 1px dashed #3b3b54;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-top: 1rem;
}
.madika-ads-preview h3 { margin-top: 0; }
.madika-ads-preview-box { transform: scale(.95); transform-origin: top left; }
.madika-ads-preview-box .madika-ad { margin: 0; }

/* ── Frontend Ad Banners ─────────────────────────────────── */
.madika-ad { margin: 2.5rem 0; border-radius: 12px; overflow: hidden; }

/* --- TOP BANNER --- */
.madika-ad-top .madika-ad-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
    padding: 1.25rem 1.75rem;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(99, 102, 241, .25);
    border-radius: 12px; position: relative;
}
.madika-ad-top .madika-ad-banner::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, .08), transparent 60%);
    border-radius: 12px; pointer-events: none;
}
.madika-ad-top .madika-ad-left { flex: 1; position: relative; }
.madika-ad-top .madika-ad-label {
    display: inline-block; font-size: .65rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .1em; color: #818cf8; background: rgba(99, 102, 241, .15);
    padding: .15rem .5rem; border-radius: 4px; margin-bottom: .35rem;
}
.madika-ad-title { font-size: 1.05rem; font-weight: 700; color: #f8fafc; margin: .25rem 0; }
.madika-ad-text { font-size: .88rem; color: #94a3b8; margin: 0; line-height: 1.5; }
.madika-ad-text strong { color: #10b981; }
.madika-ad-cta {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .6rem 1.25rem; background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff; font-weight: 600; font-size: .88rem; border-radius: 8px;
    text-decoration: none; white-space: nowrap; transition: all .25s ease;
    position: relative; flex-shrink: 0;
}
.madika-ad-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(99, 102, 241, .4); color: #fff; }

/* --- MID BANNER (compact) --- */
.madika-ad-mid .madika-ad-compact {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    border: 1px solid rgba(244, 63, 94, .2); border-radius: 10px; position: relative;
}
.madika-ad-mid .madika-ad-compact::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: linear-gradient(180deg, #f43f5e, #e11d48); border-radius: 10px 0 0 10px;
}
.madika-ad-icon { color: #f43f5e; flex-shrink: 0; display: flex; align-items: center; }
.madika-ad-body { flex: 1; }
.madika-ad-body .madika-ad-label {
    display: inline-block; font-size: .6rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .1em; color: #f43f5e; background: rgba(244, 63, 94, .12);
    padding: .1rem .4rem; border-radius: 3px;
}
.madika-ad-body .madika-ad-title { font-size: .95rem; margin: .15rem 0; }
.madika-ad-body .madika-ad-text { font-size: .82rem; }
.madika-ad-mid .madika-ad-cta { background: linear-gradient(135deg, #f43f5e, #e11d48); flex-shrink: 0; }
.madika-ad-mid .madika-ad-cta:hover { box-shadow: 0 6px 20px rgba(244, 63, 94, .4); }

/* --- BOTTOM BANNER --- */
.madika-ad-bottom .madika-ad-bottom-card {
    text-align: center; padding: 2rem 2.5rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    border: 1px solid rgba(99, 102, 241, .2); border-radius: 12px;
    position: relative; overflow: hidden;
}
.madika-ad-bottom .madika-ad-bottom-card::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at center, rgba(99, 102, 241, .06) 0%, transparent 50%);
    pointer-events: none;
}
.madika-ad-badge {
    display: inline-block; font-size: .65rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .12em; color: #818cf8; background: rgba(99, 102, 241, .12);
    padding: .2rem .7rem; border-radius: 20px; margin-bottom: .75rem;
}
.madika-ad-headline { font-size: 1.3rem; font-weight: 800; color: #f8fafc; margin: 0 0 .4rem; position: relative; }
.madika-ad-sub {
    font-size: .92rem; color: #94a3b8; margin: 0 0 1rem;
    position: relative; max-width: 480px; margin-left: auto; margin-right: auto; line-height: 1.5;
}
.madika-ad-features {
    display: flex; justify-content: center; gap: 1.25rem; margin-bottom: 1.25rem;
    flex-wrap: wrap; position: relative;
}
.madika-ad-features span {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .82rem; color: #cbd5e1; font-weight: 500;
}
.madika-ad-btn-main {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .7rem 1.75rem; background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #fff; font-weight: 700; font-size: .95rem; border-radius: 10px;
    text-decoration: none; transition: all .25s ease; position: relative;
}
.madika-ad-btn-main:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(99, 102, 241, .45); color: #fff; }

/* Responsive */
@media (max-width: 600px) {
    /* Old class-based banners (kept for compat) */
    .madika-ad-top .madika-ad-banner { flex-direction: column; text-align: center; }
    .madika-ad-mid .madika-ad-compact { flex-direction: column; text-align: center; }
    .madika-ad-mid .madika-ad-compact::before { display: none; }
    .madika-ad-bottom .madika-ad-bottom-card { padding: 1.5rem 1rem; }
    .madika-ad-headline { font-size: 1.1rem; }
    .madika-ad-features { gap: .75rem; }

    /* New inline-style banners: stack horizontally flex items vertically */
    .madika-ad[data-ad-style="1"] > div { flex-direction: column !important; text-align: center !important; }
    .madika-ad[data-ad-style="1"] > div > div:first-child { text-align: center !important; }
    .madika-ad[data-ad-style="2"] > div { flex-direction: column !important; text-align: center !important; }
    .madika-ad[data-ad-style="2"] > div > div:first-child { text-align: center !important; }
    .madika-ad[data-ad-style="3"] > div { padding: 1.5rem 1rem !important; }
    .madika-ad[data-ad-style="4"] > div { flex-direction: column !important; }
    .madika-ad[data-ad-style="4"] > div > div { min-width: auto !important; }
    .madika-ad[data-ad-style="5"] > div { flex-direction: column !important; text-align: center !important; }
    .madika-ad[data-ad-style="6"] > div { padding: 1.5rem 1rem !important; }
    .madika-ad[data-ad-style="6"] > div > div { min-width: auto !important; flex: 1 1 45% !important; }
    .madika-ad[data-ad-style="7"] > div { flex-direction: column !important; }
    .madika-ad[data-ad-style="8"] > div > div { flex-direction: column !important; text-align: center !important; }
}