/* Mobile Submenu Styles */
.mobile-submenu {
    transition: all 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
}

.mobile-submenu:not(.hidden) {
    max-height: 500px;
}

.mobile-menu-toggle svg:last-child {
    transition: transform 0.3s ease-in-out;
}

/* Submenu container styles */
.submenu-container {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.95) 0%, rgba(55, 48, 107, 0.95) 100%);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(139, 92, 246, 0.1);
}

/* Hover effects for submenu items only */
.submenu-item:hover .icon-container {
    transform: scale(1.1);
}

.submenu-item:hover .icon-container > div {
    background: linear-gradient(135deg, #eab308, #facc15) !important;
}

.submenu-item:hover .menu-title:not(.text-yellow-400) {
    color: #facc15 !important;
}

.submenu-item:hover .underline-span:not(.w-full) {
    width: 100% !important;
}

.submenu-item:hover .menu-description {
    color: #d1d5db !important;
}

/* Desktop submenu hover - Now using CSS hover (JS control removed) */
/* Note: Critical inline CSS in header.php prevents FOUC with !important */
/* These rules maintain behavior and override inline CSS on hover */
@media (min-width: 1024px) {
    .group > .absolute {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .group:hover > .absolute,
    .group:hover > div.absolute {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
}

/* Floating Feedback Widget */
.floating-feedback-widget {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(-100px) scale(0.8);
    z-index: 1000;
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.floating-feedback-widget.show {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0) scale(1);
    pointer-events: auto;
}

.floating-feedback-widget.hide {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(-100px) scale(0.8);
    pointer-events: none;
}

.floating-widget-container {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.95) 0%, rgba(55, 48, 107, 0.95) 100%);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(139, 92, 246, 0.1);
    min-width: 280px;
    max-width: 320px;
}

.floating-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.floating-widget-title {
    color: #fbbf24;
    font-weight: 600;
    font-size: 14px;
    margin: 0;
}

.floating-widget-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.floating-widget-close:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.floating-widget-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.floating-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 8px;
    border: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.floating-like-btn {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
}

.floating-like-btn:hover {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    transform: translateY(-1px);
}

.floating-like-btn.liked {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.floating-feedback-btn {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.floating-feedback-btn:hover {
    background: rgba(34, 197, 94, 0.3);
    transform: translateY(-1px);
}

.floating-widget-footer {
    text-align: center;
    color: #9ca3af;
    font-size: 11px;
}

.floating-widget-pulse {
    animation: floatingPulse 2s infinite;
}

@keyframes floatingPulse {
    0%, 100% {
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(139, 92, 246, 0.1);
    }
    50% {
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(139, 92, 246, 0.3);
    }
}

/* Backdrop overlay for centered widget */
.floating-widget-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.floating-widget-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.floating-widget-backdrop.hide {
    opacity: 0;
    pointer-events: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .floating-feedback-widget {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) translateY(-100px) scale(0.8);
        width: calc(100vw - 30px);
        max-width: 400px;
    }

    .floating-feedback-widget.show {
        transform: translate(-50%, -50%) translateY(0) scale(1);
    }

    .floating-feedback-widget.hide {
        transform: translate(-50%, -50%) translateY(-100px) scale(0.8);
    }

    .floating-widget-container {
        min-width: auto;
        max-width: none;
        padding: 16px;
        margin: 0 auto;
    }

    .floating-widget-actions {
        flex-direction: column;
        gap: 8px;
    }

    .floating-action-btn {
        padding: 12px;
        font-size: 14px;
    }
}

/* Small mobile screens */
@media (max-width: 480px) {
    .floating-feedback-widget {
        width: calc(100vw - 20px);
        max-width: 350px;
    }

    .floating-widget-container {
        padding: 14px;
    }

    .floating-widget-title {
        font-size: 13px;
    }

    .floating-action-btn {
        padding: 10px;
        font-size: 13px;
    }
}
