/*
	Theme Name: ROMSFUN-V2
	Theme URI: mail:foodcenter.live@gmail.com
	Description: ROMSFUN-V2
	Version: 1.0.0
	Author: Trump
	Author URI: mail:foodcenter.live@gmail.com
	Tags: Tailwindcss
	License: MIT
	Text Domain: romsfun
	License URI: http://opensource.org/licenses/mit-license.php
*/

#wpadminbar {
    position: absolute !important;
}

html {
    scroll-behavior: smooth;
}
/* Base font styles matching design */
body {
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    background-color: #f3f3f3;
    color: #101828;
}

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #e91e63;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.scroll-to-top:hover {
    background-color: #c2185b;
    transform: translateY(-3px);
}

.scroll-to-top.hidden {
    display: none;
}

/* Horizontal Scroll Container */
.horizontal-scroll-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(155, 155, 155, 0.5) transparent;
}

.horizontal-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.horizontal-scroll-container::-webkit-scrollbar-track {
    background: transparent;
}

.horizontal-scroll-container::-webkit-scrollbar-thumb {
    background-color: rgba(155, 155, 155, 0.5);
    border-radius: 4px;
}

.horizontal-scroll-container::-webkit-scrollbar-thumb:hover {
    background-color: rgba(155, 155, 155, 0.7);
}

.horizontal-scroll-wrapper {
    display: flex;
    padding: 16px 0;
    scroll-snap-type: x mandatory;
    touch-action: pan-x pan-y;
}

.horizontal-scroll-wrapper > * {
    scroll-snap-align: start;
}

/* Carousel styles */
.carousel-container {
    position: relative;
    overflow-x: hidden;
    overflow-y: visible;
    padding: 0;
}

.carousel-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
    padding: 16px 0;
    margin: 0 -4px;
}

.carousel-button {
    background-color: #e91e63;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.carousel-button:hover:not(.disabled):not(:disabled) {
    background-color: #c2185b;
    transform: scale(1.1);
}

.carousel-button.disabled,
.carousel-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.carousel-button.disabled:hover,
.carousel-button:disabled:hover {
    background-color: #e91e63;
    transform: none;
}

/* Badge styles for Popular ROMs */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background-color: #f3f4f6;
    border-radius: 12px;
    font-size: 12px;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.badge-genre {
    background-color: #e0e7ff;
    color: #3730a3;
    border-color: #c7d2fe;
}

.badge-info {
    background-color: #f3f4f6;
    color: #6b7280;
    border-color: #e5e7eb;
}

.carousel-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Header Menu Styles */
.header-nav-link {
    display: inline-block;
    padding: 8px 16px;
    background-color: white;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.3s;
}

.header-nav-link:hover {
    background-color: #f3f4f6;
}

.header-nav-link.active {
    background-color: #e91e63;
    color: white;
}

/* Mobile Menu Styles */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.mobile-menu-overlay.active {
    display: block;
}

.mobile-menu-panel {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background-color: #e91e63;
    z-index: 1000;
    transition: left 0.3s ease-in-out;
    overflow-y: auto;
}

.mobile-menu-panel.active {
    z-index: 999999;
    left: 0;
}

.mobile-menu-header {
    background-color: #e91e63;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.mobile-menu-close:hover {
    opacity: 0.8;
}

.mobile-menu-content {
    padding: 0;
}

.mobile-menu-item {
    display: block;
    padding: 16px 20px;
    color: white;
    text-decoration: none;
    font-size: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s;
}

.mobile-menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-menu-item.active {
    background-color: white;
    color: #e91e63;
}

/* Container max-width for desktop */
@media (min-width: 1024px) {
    .content-container {
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* Custom Multi-Select Dropdown Styles */
.custom-select-wrapper {
    position: relative;
}

.custom-select-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    font-size: 14px;
    color: #333;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s;
}

.custom-select-trigger:hover {
    border-color: #e91e63;
}

.custom-select-trigger.active {
    border-color: #e91e63;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

.custom-select-trigger .selected-text {
    flex: 1;
    text-align: left;
    color: #666;
}

.custom-select-trigger .selected-text.has-selection {
    color: #333;
}

.custom-select-trigger .arrow {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #666;
    transition: transform 0.3s;
    margin-left: 10px;
}

.custom-select-trigger.active .arrow {
    transform: rotate(180deg);
}

.custom-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
    display: none;
}

.custom-select-dropdown.active {
    display: block;
}

.custom-select-option {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
}

.custom-select-option:hover {
    background-color: #f5f5f5;
}

.custom-select-option input[type="checkbox"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #e91e63;
}

.custom-select-option input[type="radio"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #e91e63;
}

.custom-select-option label {
    cursor: pointer;
    flex: 1;
    margin: 0;
    font-size: 14px;
    color: #333;
}

/* Close dropdown when clicking outside */
.custom-select-wrapper.closing .custom-select-dropdown {
    animation: fadeOut 0.2s ease-out;
}



@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Scrollbar styling for dropdown */
.custom-select-dropdown::-webkit-scrollbar {
    width: 8px;
}

.custom-select-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.revert * {
    all: revert;
    max-width: 100%;
}

/* Toast Notification Styles */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    animation: slideInRight 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #e91e63;
}

.toast.success::before {
    background-color: #10b981;
}

.toast.error::before {
    background-color: #ef4444;
}

.toast.hiding {
    animation: slideOutRight 0.3s ease-in forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast.success .toast-icon {
    color: #10b981;
}

.toast.error .toast-icon {
    color: #ef4444;
}

.toast-content {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    border-radius: 4px;
}

.toast-close:hover {
    color: #374151;
    background-color: #f3f4f6;
}

/* Adjust for mobile */
@media (max-width: 640px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast {
        padding: 14px;
    }
    
    @keyframes slideInRight {
        from {
            transform: translateY(-100px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    @keyframes slideOutRight {
        from {
            transform: translateY(0);
            opacity: 1;
        }
        to {
            transform: translateY(-100px);
            opacity: 0;
        }
    }
}

/* Adjust for admin bar */
body.admin-bar .toast-container {
    top: 52px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .toast-container {
        top: 66px;
    }
}