/* ─────────────────────────────────────────────
   WD Affiliate Rotator — Frontend Styles
   ───────────────────────────────────────────── */

:root {
    --wd-bg:     #1a1a1a;
    --wd-accent: #c8860a;
}

/* Wrapper: fixed at top of viewport, full width, above everything */
#wd-rotator-wrap {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    font-family: Arial, Helvetica, sans-serif;
}

/* ── NAV BAR ── */
.wd-nav-bar {
    height: 50px;
    background: var(--wd-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 16px;
}

.wd-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.wd-logo-icon {
    width: 34px;
    height: 34px;
    border: 2px solid var(--wd-accent);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 13px;
    color: var(--wd-accent);
    flex-shrink: 0;
    background: var(--wd-bg);
}

.wd-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.wd-logo-name {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}

.wd-logo-tag {
    color: var(--wd-accent);
    font-size: 9px;
}

/* Hamburger button */
.wd-ham {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.wd-ham span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.2s;
}

/* Dropdown nav */
.wd-dropdown {
    display: none;
    position: absolute;
    right: 12px;
    top: 46px;
    background: var(--wd-bg);
    border: 1px solid #333;
    border-radius: 6px;
    overflow: hidden;
    min-width: 160px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    z-index: 1000;
}

.wd-dropdown.open {
    display: block;
}

.wd-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wd-dropdown ul li a {
    display: block;
    padding: 12px 20px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid #2a2a2a;
    transition: background 0.15s;
}

.wd-dropdown ul li:last-child a {
    border-bottom: none;
}

.wd-dropdown ul li a:hover {
    background: #2a2a2a;
    color: var(--wd-accent);
}

/* ── EMAIL STRIP ── */
.wd-email-strip {
    height: 40px;
    background: #2c2c2c;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-bottom: 1px solid #3a3a3a;
    gap: 0;
}

.wd-email-strip input[type="email"] {
    height: 26px;
    padding: 0 10px;
    border: 1px solid #555;
    border-right: none;
    border-radius: 4px 0 0 4px;
    background: #1a1a1a;
    color: #ccc;
    font-size: 12px;
    font-family: Arial, Helvetica, sans-serif;
    width: 100%;
    max-width: 260px;
    outline: none;
    box-shadow: none;
}

.wd-email-strip input[type="email"]::placeholder {
    color: #666;
}

.wd-email-strip input[type="email"]:focus {
    border-color: var(--wd-accent);
}

.wd-email-strip button,
#wd-email-btn {
    height: 26px;
    padding: 0 14px;
    background: var(--wd-accent);
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    font-size: 12px;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.wd-email-strip button:hover,
#wd-email-btn:hover {
    filter: brightness(1.15);
}

/* Success state */
.wd-email-strip.wd-subscribed input {
    border-color: #2ecc71;
}

/* ── ROTATOR STRIP ── */
.wd-rotator-strip {
    height: 35px;
    background: #111;
    border-bottom: 2px solid var(--wd-accent);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
}

/* Individual rotator item — starts off-screen to the RIGHT */
.wd-rot-item {
    position: absolute;
    left: 50%;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 600;
    transform: translateX(-50%) translateX(900px);
    opacity: 0;
    pointer-events: none;
}

.wd-arr {
    color: var(--wd-accent);
}

/* RIGHT → CENTER → LEFT (natural reading direction) */
@keyframes wdRTL {
    0%   { transform: translateX(-50%) translateX(900px);  opacity: 0; }
    8%   { opacity: 1; }
    35%  { transform: translateX(-50%) translateX(0); }
    65%  { transform: translateX(-50%) translateX(0);   opacity: 1; }
    88%  { opacity: 0; }
    100% { transform: translateX(-50%) translateX(-900px); opacity: 0; }
}

.wd-rot-item.animating {
    animation: wdRTL var(--wd-spd, 7s) ease-in-out forwards;
    pointer-events: auto;
}

/* ── BODY OFFSET — push page content below the sticky bars ── */
/* Height = nav(50) + email(40) + rotator(35) = 125px
   When email strip is hidden the JS adjusts this */
body.wd-has-bars {
    padding-top: 125px !important;
}

body.wd-has-bars.wd-no-email {
    padding-top: 85px !important;
}

/* ── MOBILE ADJUSTMENTS ── */
@media (max-width: 600px) {
    .wd-logo-name  { font-size: 13px; }
    .wd-logo-tag   { display: none; }
    .wd-logo-icon  { width: 28px; height: 28px; font-size: 11px; }
    .wd-rot-item   { font-size: 12px; }

    .wd-email-strip input[type="email"] {
        max-width: 160px;
        font-size: 11px;
    }
}

@media (max-width: 380px) {
    .wd-logo-icon { display: none; }
}
