/**
 * FLOATING WIDGETS STYLING
 * Mobile bottom panel and desktop floating widgets
 */

/* ========== MOBILE BOTTOM PANEL ========== */
.floating-widgets-mobile {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    z-index: 999;
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.floating-widgets-mobile.collapsed {
    transform: translateY(120%);
}

@media (min-width: 769px) {
    .floating-widgets-mobile {
        display: none !important;
    }
}

.floating-panel-content {
    display: flex;
    justify-content: center;
    gap: 16px;
    width: 100%;
    flex-wrap: wrap;
}

.floating-widget-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
    max-width: 180px;
}

.floating-widget-btn:hover,
.floating-widget-btn:active {
    background: var(--gold-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.floating-widget-btn svg {
    width: 20px;
    height: 20px;
}

.floating-widget-btn .btn-label {
    font-weight: 600;
}

.whatsapp-btn {
    background: #25d366;
    border-color: #25d366;
    color: white;
}

.whatsapp-btn:hover {
    background: #1fa855;
    border-color: #1fa855;
}

.support-btn {
    background: var(--gold-light);
    border-color: var(--gold-primary);
    border: none;
}

.support-btn:hover {
    background: var(--gold-primary);
}

.floating-widgets-mobile-toggle {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 998;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gold-primary);
    color: white;
    border: none;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-widgets-mobile-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.floating-widgets-mobile-toggle:active {
    transform: scale(0.95);
}

/* Rotate toggle when panel is expanded */
.floating-widgets-mobile:not(.collapsed)~.floating-widgets-mobile-toggle {
    transform: rotate(45deg);
}

/* ========== DESKTOP FLOATING WIDGETS ========== */
.floating-widgets-desktop {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (max-width: 768px) {
    .floating-widgets-desktop {
        display: none !important;
    }
}

.floating-widget-btn-desktop {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    text-decoration: none;
}

.floating-widget-btn-desktop:hover {
    transform: scale(1.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.floating-widget-btn-desktop:hover span {
    opacity: 1;
    visibility: visible;
}

.floating-widget-btn-desktop svg {
    width: 32px;
    height: 32px;
    transition: transform 0.3s ease;
}

.floating-widget-btn-desktop:hover svg {
    transform: rotate(15deg) scale(1.1);
}

.floating-widget-btn-desktop span {
    position: absolute;
    right: 70px;
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
}

.whatsapp-btn-desktop {
    background: #25d366;
    border: 3px solid white;
    color: white;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn-desktop:hover {
    background: #1fa855;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5);
}

.whatsapp-btn-desktop:hover svg {
    animation: whatsapp-pulse 0.6s ease-out;
}

@keyframes whatsapp-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.support-btn-desktop {
    background: var(--gold-light);
    border: 3px solid white;
    color: #1a1410;
    box-shadow: 0 4px 16px rgba(218, 165, 32, 0.3);
}

.support-btn-desktop:hover {
    background: var(--gold-primary);
    box-shadow: 0 8px 24px rgba(218, 165, 32, 0.5);
}

/* ========== SUPPORT POPUP MODAL ========== */
#support-popup-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.support-popup-content {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 32px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.support-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.support-popup-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.support-popup-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.support-popup-close:hover {
    color: var(--text-primary);
}

.support-popup-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.support-option {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.support-option:hover {
    background: var(--bg-tertiary);
    border-color: var(--gold-primary);
    transform: translateX(4px);
}

.support-option-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.support-option-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.support-option-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .floating-widget-btn {
        min-width: 100px;
        max-width: none;
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .floating-widgets-mobile {
        bottom: 56px;
        padding: 10px 12px;
        gap: 8px;
    }

    .floating-widgets-mobile-toggle {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 12px;
        right: 12px;
    }

    .support-popup-content {
        padding: 20px;
        border-radius: 8px;
    }

    .support-popup-header {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    .support-popup-header h3 {
        font-size: 1.2rem;
    }
}

/* Dark theme adjustments */
[data-theme="dark"] .floating-widgets-mobile,
[data-theme="dark"] .floating-widget-btn-desktop {
    background: var(--bg-secondary);
}

[data-theme="dark"] .floating-widget-btn-desktop span {
    background: var(--bg-secondary);
    color: var(--text-primary);
}