/**
 * Aidi Workers - Frontend Styles v2.0.4
 * Uses #aw-widget ID prefix + !important to override any theme styles
 */

/* ============================================================
   BASE WIDGET
   ============================================================ */

#aw-widget {
    display: block !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #333333 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 20px auto !important;
    padding: 0 !important;
    max-width: 480px !important;
    box-sizing: border-box !important;
    text-align: center !important;
}

#aw-widget * {
    box-sizing: border-box !important;
    font-family: inherit !important;
}

/* Alignment modifiers */
#aw-widget.aw-center { margin-left: auto !important; margin-right: auto !important; }
#aw-widget.aw-left   { text-align: left !important; margin-left: 0 !important; }
#aw-widget.aw-right  { text-align: right !important; margin-right: 0 !important; }


/* ============================================================
   PROGRESS BAR
   ============================================================ */

#aw-widget #aw-prog-wrap {
    margin-bottom: 14px !important;
    background: transparent !important;
}

#aw-widget .aw-prog-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 12px !important;
    color: #888888 !important;
    margin-bottom: 5px !important;
    background: transparent !important;
}

#aw-widget .aw-prog-count {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #555555 !important;
    background: #f0f0f0 !important;
    padding: 1px 7px !important;
    border-radius: 20px !important;
}

#aw-widget .aw-bar-bg {
    background: #eeeeee !important;
    border-radius: 99px !important;
    height: 5px !important;
    overflow: hidden !important;
}

#aw-widget .aw-bar-fill {
    height: 100% !important;
    background: #4CAF50 !important;
    border-radius: 99px !important;
    transition: width 0.5s ease !important;
}


/* ============================================================
   COUNTDOWN RING
   ============================================================ */

#aw-widget #aw-ring-wrap {
    /* No display here — controlled entirely by inline style="display:none"
       and jQuery fadeIn(). !important on display would fight with both. */
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    width: 76px !important;
    height: 76px !important;
    margin: 10px auto !important;
    background: transparent !important;
}

/* When shown by JS, make it flex */
#aw-widget #aw-ring-wrap[style*="display: block"],
#aw-widget #aw-ring-wrap[style*="display:block"],
#aw-widget #aw-ring-wrap[style*="display: flex"],
#aw-widget #aw-ring-wrap[style*="display:flex"] {
    display: flex !important;
}

#aw-widget #aw-ring-wrap svg {
    display: block !important;
    background: transparent !important;
}

#aw-widget .aw-timer-num {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #333333 !important;
    line-height: 1 !important;
    background: transparent !important;
    pointer-events: none !important;
}


/* ============================================================
   WAIT AREA
   ============================================================ */

#aw-widget .aw-row {
    margin: 8px 0 !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

/* Wait text — always plain text during countdown */
#aw-widget .aw-wait-text {
    color: #aaaaaa !important;
    font-size: 13px !important;
    font-style: italic !important;
    background: transparent !important;
    display: inline !important;
}


/* ============================================================
   NEXT ARTICLE — BUTTON MODE
   Theme-controlled: no plugin visual button styling.
   ============================================================ */

#aw-widget #aw-next-wrap {
    margin: 10px 0 !important;
    background: transparent !important;
}

/* ============================================================
   NEXT ARTICLE — PLAIN LINK MODE
   Theme-controlled: no plugin visual link styling.
   ============================================================ */


/* ============================================================
   GENERATE CODE BUTTON
   Theme-controlled: no plugin visual button styling.
   ============================================================ */


/* ============================================================
   REWARD CODE BOX
   ============================================================ */

#aw-widget #aw-code-wrap {
    margin-top: 8px !important;
    background: transparent !important;
}

#aw-widget .aw-code-box {
    border: 1.5px solid #4CAF50 !important;
    border-radius: 10px !important;
    padding: 16px !important;
    background: #f9fdf9 !important;
    text-align: center !important;
    box-shadow: none !important;
}

#aw-widget .aw-code-label {
    font-size: 12px !important;
    color: #777777 !important;
    margin-bottom: 10px !important;
    background: transparent !important;
}

#aw-widget .aw-code-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    background: #f0f9f0 !important;
    border: 1px dashed #4CAF50 !important;
    border-radius: 7px !important;
    padding: 12px 14px !important;
}

#aw-widget .aw-code-val {
    font-family: "Courier New", Courier, monospace !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #2E7D32 !important;
    letter-spacing: 3px !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    flex: 1 !important;
    text-align: center !important;
}

#aw-widget .aw-copy-msg {
    display: none;
    margin-top: 8px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #4CAF50 !important;
    background: transparent !important;
}


/* ============================================================
   SCROLL DEPTH INDICATOR
   ============================================================ */

#aw-widget #aw-scroll-wrap {
    margin: 10px 0 !important;
    padding: 12px 14px !important;
    background: #f8fbff !important;
    border: 1px solid #BBDEFB !important;
    border-radius: 8px !important;
    text-align: center !important;
    box-shadow: none !important;
}

#aw-widget .aw-scroll-msg {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #1565C0 !important;
    margin-bottom: 8px !important;
    background: transparent !important;
}

#aw-widget .aw-scroll-bar-bg {
    background: #BBDEFB !important;
    border-radius: 99px !important;
    height: 5px !important;
    overflow: hidden !important;
    margin-bottom: 5px !important;
}

#aw-widget .aw-scroll-bar-fill {
    height: 100% !important;
    background: #1976D2 !important;
    border-radius: 99px !important;
    transition: width 0.4s ease !important;
}

#aw-widget .aw-scroll-pct-row {
    display: flex !important;
    justify-content: space-between !important;
    font-size: 11px !important;
    color: #aaaaaa !important;
    background: transparent !important;
}

#aw-widget #aw-scroll-pct {
    font-weight: 700 !important;
    color: #1976D2 !important;
    background: transparent !important;
}


/* ============================================================
   LOADING SPINNER
   ============================================================ */

#aw-widget #aw-loading {
    text-align: center !important;
    padding: 8px !important;
    background: transparent !important;
}

#aw-widget .aw-spin {
    display: inline-block !important;
    width: 20px !important;
    height: 20px !important;
    border: 2px solid #eeeeee !important;
    border-top-color: #1976D2 !important;
    border-radius: 50% !important;
    animation: awSpin 0.7s linear infinite !important;
}

@keyframes awSpin {
    to { transform: rotate(360deg); }
}


/* ============================================================
   ERROR MESSAGE
   ============================================================ */

#aw-widget .aw-err {
    margin-top: 10px !important;
    padding: 8px 12px !important;
    background: #fff3f3 !important;
    border: 1px solid #ffcdd2 !important;
    border-radius: 6px !important;
    color: #c62828 !important;
    font-size: 12px !important;
}


/* ============================================================
   UTILITY
   ============================================================ */

.aw-hidden {
    display: none !important;
}


/* ============================================================
   DEBUG PANEL (admin only)
   ============================================================ */

#aw-widget #aw-debug {
    margin-top: 16px !important;
    border: 2px dashed #FF9800 !important;
    border-radius: 7px !important;
    padding: 12px !important;
    background: #fffde7 !important;
    font-size: 12px !important;
    text-align: left !important;
    color: #333333 !important;
}

#aw-widget .aw-debug-title {
    font-weight: 700 !important;
    color: #E65100 !important;
    margin-bottom: 8px !important;
    background: transparent !important;
}

#aw-widget #aw-debug table {
    width: 100% !important;
    border-collapse: collapse !important;
    background: transparent !important;
}

#aw-widget #aw-debug th {
    background: #fff3e0 !important;
    padding: 4px 8px !important;
    text-align: left !important;
    border-bottom: 1px solid #FFE0B2 !important;
    font-size: 11px !important;
    color: #BF360C !important;
}

#aw-widget #aw-debug td {
    padding: 4px 8px !important;
    border-bottom: 1px solid #fff3e0 !important;
    word-break: break-all !important;
    color: #333333 !important;
    background: transparent !important;
}

#aw-widget #aw-debug td a {
    color: #1976D2 !important;
}

#aw-widget .aw-dbg-ok {
    background: #e8f5e9 !important;
    color: #1b5e20 !important;
    padding: 1px 7px !important;
    border-radius: 20px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
}

#aw-widget .aw-dbg-no {
    background: #fce4ec !important;
    color: #b71c1c !important;
    padding: 1px 7px !important;
    border-radius: 20px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
}

#aw-widget .aw-debug-info {
    margin-top: 8px !important;
    padding-top: 6px !important;
    border-top: 1px solid #FFE0B2 !important;
    color: #555555 !important;
    background: transparent !important;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 480px) {
    #aw-widget {
        margin: 16px 0 !important;
    }


    #aw-widget .aw-code-val {
        font-size: 16px !important;
        letter-spacing: 2px !important;
    }
}


/* ============================================================
   v2.1.2 Reward Code Alignment Polish
   ============================================================ */

#aw-widget .aw-code-row {
    position: relative !important;
    justify-content: center !important;
    padding: 14px 56px 14px 18px !important;
    min-height: 56px !important;
}

#aw-widget .aw-code-val {
    width: 100% !important;
    display: block !important;
    padding: 0 4px !important;
    text-align: center !important;
}

#aw-widget .aw-copy-btn {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}


/* ============================================================
   v2.1.10 Native Theme Buttons
   ============================================================
   Frontend buttons intentionally have no plugin color, border,
   padding, radius, or shadow styling. The active WordPress theme
   controls button appearance. Only layout positioning is kept for
   the reward-code copy button so the code remains centered.
*/
