/**
 * Monsters Lab Reader Reward - Floating Progress Ring CSS
 *
 * Isolated, zero-collision styles compatible with Tailwind CSS & Google AdSense.
 *
 * @package Monsters_Lab_Reader_Reward
 * @version 1.0.0
 */

#mlrr-floating-widget {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(13, 15, 18, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
    padding: 6px 14px 6px 6px;
    box-shadow: 0 14px 30px -6px rgba(0, 0, 0, 0.55), 0 0 1px 1px rgba(255, 255, 255, 0.08);
    font-family: 'Noto Sans Bengali', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #ffffff;
    user-select: none;
    -webkit-user-select: none;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
    cursor: default;
}

#mlrr-floating-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 35px -8px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(220, 38, 38, 0.4);
    border-color: rgba(220, 38, 38, 0.5);
}

/* SVG Circular Gauge */
.mlrr-ring-wrapper {
    position: relative;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    shrink: 0;
}

.mlrr-ring-svg {
    transform: rotate(-90deg);
    width: 52px;
    height: 52px;
}

.mlrr-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 4;
}

.mlrr-ring-progress {
    fill: none;
    stroke: #dc2626; /* Brand Red */
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.2s linear, stroke 0.3s ease;
}

/* Central Numeric / Icon Label */
.mlrr-ring-center-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: 800;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: -0.5px;
    color: #ffffff;
    text-align: center;
    line-height: 1;
}

/* Info Stack (Coins & Status) */
.mlrr-info-stack {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 70px;
}

.mlrr-coins-badge {
    font-size: 13px;
    font-weight: 800;
    color: #00FF88; /* Emerald Accent */
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: 0.2px;
    line-height: 1.2;
}

.mlrr-status-subtext {
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1.2;
    margin-top: 1px;
}

/* State Modifiers */
#mlrr-floating-widget.mlrr-paused .mlrr-ring-progress {
    stroke: #f59e0b; /* Amber */
}

#mlrr-floating-widget.mlrr-paused .mlrr-status-subtext {
    color: #f59e0b;
}

#mlrr-floating-widget.mlrr-completed .mlrr-ring-progress {
    stroke: #00FF88; /* Emerald */
}

#mlrr-floating-widget.mlrr-completed .mlrr-status-subtext {
    color: #00FF88;
}

#mlrr-floating-widget.mlrr-locked {
    cursor: pointer;
}

#mlrr-floating-widget.mlrr-locked:hover {
    border-color: #f59e0b;
}

/* Reward Pop Floating Animation */
.mlrr-reward-pop {
    position: absolute;
    top: -12px;
    right: 10px;
    background: #00FF88;
    color: #000000;
    font-size: 11px;
    font-weight: 900;
    font-family: ui-monospace, monospace;
    padding: 2px 8px;
    border-radius: 9999px;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.6);
    pointer-events: none;
    animation: mlrrFloatUp 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes mlrrFloatUp {
    0% {
        opacity: 0;
        transform: translateY(6px) scale(0.8);
    }
    15% {
        opacity: 1;
        transform: translateY(-8px) scale(1.1);
    }
    75% {
        opacity: 1;
        transform: translateY(-22px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-34px) scale(0.9);
    }
}

/* Mobile Screen Layout */
@media (max-width: 640px) {
    #mlrr-floating-widget {
        bottom: 16px;
        left: 16px;
        padding: 4px 10px 4px 4px;
        gap: 8px;
    }

    .mlrr-ring-wrapper {
        width: 44px;
        height: 44px;
    }

    .mlrr-ring-svg {
        width: 44px;
        height: 44px;
    }

    .mlrr-ring-center-text {
        font-size: 10px;
    }

    .mlrr-coins-badge {
        font-size: 11px;
    }

    .mlrr-status-subtext {
        font-size: 9px;
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    #mlrr-floating-widget,
    .mlrr-ring-progress,
    .mlrr-reward-pop {
        transition: none !important;
        animation: none !important;
    }
}

/* Print Friendly: Hide completely */
@media print {
    #mlrr-floating-widget {
        display: none !important;
    }
}
