/* ==========================================================================
   MediaTasker Floating Action Menu
   ========================================================================== */

:root {
    --mediat_float-bg: rgba(255, 255, 255, 0.75);
    --mediat_float-blur: 12px;
    --mediat_float-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    --mediat_float-border: 1px solid rgba(255, 255, 255, 0.5);
    --mediat_float-radius: 50px;

    --mediat_clr-pending: #ff4757;
    --mediat_clr-progress: #ffa502;
    --mediat_clr-completed: #2ed573;
    --mediat_clr-primary: #1e90ff;
    --mediat_clr-danger: #ea2027;
}

.mediat_floating-controls {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    background: var(--mediat_float-bg);
    backdrop-filter: blur(var(--mediat_float-blur));
    -webkit-backdrop-filter: blur(var(--mediat_float-blur));
    padding: 10px 16px;
    border-radius: var(--mediat_float-radius);
    border: var(--mediat_float-border);
    box-shadow: var(--mediat_float-shadow);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 0;
    visibility: hidden;
    user-select: none;
    width: max-content;
}

.mediat_floating-controls.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Selection Count Badge */
.mediat_selection-count {
    background: linear-gradient(135deg, #2f3542, #57606f);
    color: #fff;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

/* Separator */
.mediat_float-sep {
    width: 1px;
    height: 24px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0 4px;
}

/* Buttons */
.mediat_float-btn {
    background: transparent;
    border: none;
    color: #2f3542;
    padding: 8px 14px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mediat_float-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.mediat_float-btn:active {
    transform: translateY(0);
}

.mediat_float-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mediat_float-btn:hover .dashicons {
    transform: scale(1.2);
}

/* Specific Action Colors */
.mediat_float-btn.action-deselect {
    color: #747d8c;
}

.mediat_float-btn.action-download {
    background: rgba(30, 144, 255, 0.1);
    color: var(--mediat_clr-primary);
}

.mediat_float-btn.action-download:hover {
    background: var(--mediat_clr-primary);
    color: #fff;
}

.mediat_float-btn.action-delete {
    background: rgba(234, 32, 39, 0.1);
    color: var(--mediat_clr-danger);
}

.mediat_float-btn.action-delete:hover {
    background: var(--mediat_clr-danger);
    color: #fff;
}

/* State Toggles */
.mediat_state-toggles {
    display: flex;
    background: rgba(0, 0, 0, 0.03);
    padding: 4px;
    border-radius: 30px;
    gap: 4px;
}

.mediat_state-btn {
    background: transparent;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.mediat_state-btn[data-state="pending"] {
    color: var(--mediat_clr-pending);
}

.mediat_state-btn[data-state="in-progress"] {
    color: var(--mediat_clr-progress);
}

.mediat_state-btn[data-state="completed"] {
    color: var(--mediat_clr-completed);
}

.mediat_state-btn:hover {
    transform: scale(1.1);
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.mediat_state-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Tooltips (Simple CSS-based) */
.mediat_state-btn::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: #2f3542;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    pointer-events: none;
}

.mediat_state-btn:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .mediat_floating-controls {
        padding: 8px 12px;
        gap: 8px;
        bottom: 20px;
    }

    .mediat_float-btn span {
        display: none;
        /* Icons only on small screens */
    }

    .mediat_float-btn {
        padding: 8px;
    }
}

/* Animations */
@keyframes mediat_spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.is-spinning {
    animation: mediat_spin 1s linear infinite;
    display: inline-block !important;
}
