/* ===============================================
   ELDER SPORES ONLINE - CONSUMABLES SELECTOR STYLES
   Version: 1.0
   Created: October 30, 2025
   
   Styles for consumables selection modal with
   quick slots and drag & drop functionality
   =============================================== */

/* ===== MODAL STRUCTURE ===== */
.consumables-selector-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* Allow events to pass through to destination slots */
}

.consumables-selector-overlay {
    display: none; /* Hidden - no overlay needed for drag & drop */
}

.consumables-selector-window {
    position: absolute;
    left: 31%; /*52*/
    top: 30.25%;
    pointer-events: auto; /* Re-enable events for the modal window itself */
    width:36.75%;
    max-width: 900px;
    height: 66.5%;
    max-height: 700px;
    background-color: #1a1a1a;
    background-image: url('/graphics/alchemy_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid var(--color-secondary);
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    box-shadow: 
        0 0px 5px rgba(0, 0, 0, 0.9),
        0 0px 10px rgba(0, 0, 0, 0.9),
        0 0px 15px rgba(0, 0, 0, 0.9);
}

/* ===== HEADER ===== */
.consumables-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(to right, var(--color-secondary), #2a2a2a);
    border-bottom: 1px solid var(--color-secondary);
    border-radius: 20px 20px 0 0;
}

.consumables-selector-header h2 {
    margin: 0;
    color: var(--color-primary);
    font-size: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.consumables-selector-close {
    padding: 5px 10px;
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 24px;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.consumables-selector-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* ===== QUICK SLOTS ===== */
.consumables-quick-slots-container {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.3);
    /* border-bottom: 1px solid var(--color-secondary); */
}
.consumables-quick-slots-label h4 {
    margin: 0;
    color: #888;
    font-size: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}
.consumables-quick-slots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.quick-slot {
    width: 60px;
    height: 60px;
    background: rgba(10, 10, 10, 0.6);
    border: 2px solid #666;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 
        0 0px 5px rgba(0, 0, 0, 0.9),
        0 0px 10px rgba(0, 0, 0, 0.9),
        0 0px 15px rgba(0, 0, 0, 0.9);
}

.quick-slot:hover {
    border-color: var(--color-primary);
    background-color: rgba(20, 20, 20, 0.8);
}

.quick-slot.occupied {
    border-color: var(--color-success);
    background-color: rgba(20, 40, 20, 0.9);
}

/* Quality borders for quick slots */
.quick-slot.quality-0 { border-color: #808080; box-shadow: 0 0 10px rgba(128, 128, 128, 0.5); }
.quick-slot.quality-1 { border-color: #FFFFFF; box-shadow: 0 0 10px rgba(255, 255, 255, 0.5); }
.quick-slot.quality-2 { border-color: #00FF00; box-shadow: 0 0 10px rgba(0, 255, 0, 0.5); }
.quick-slot.quality-3 { border-color: #0080FF; box-shadow: 0 0 10px rgba(0, 128, 255, 0.5); }
.quick-slot.quality-4 { border-color: #A020F0; box-shadow: 0 0 10px rgba(160, 32, 240, 0.5); }
.quick-slot.quality-5 { border-color: #FFD700; box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }

/* ===== SEARCH BAR ===== */
.consumables-search-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
    /* border-bottom: 1px solid var(--color-secondary); */
}

.consumables-search-input {
    flex: 1;
    padding: 10px 15px;
    background: rgba(10, 10, 10, 0.7);
    border: 2px solid #444;
    border-radius: 10px;
    color: var(--color-text);
    font-size: 14px;
    outline: none;
    transition: var(--transition-fast);
    box-shadow: 
        0 0px 5px rgba(0, 0, 0, 0.9),
        0 0px 10px rgba(0, 0, 0, 0.9),
        0 0px 15px rgba(0, 0, 0, 0.9);
}

.consumables-search-input:focus {
    border-color: var(--color-primary);
    background: rgba(20, 20, 20, 0.8);
}

.consumables-search-input::placeholder {
    color: #7d7d7d;
    text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.9);
}

.consumables-search-clear {
    padding: 5px 10px;
    background: rgba(139, 69, 19, 0.3);
    border: 1px solid var(--color-secondary);
    color: var(--color-text);
    font-size: 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 
        0 0px 5px rgba(0, 0, 0, 0.9),
        0 0px 10px rgba(0, 0, 0, 0.9),
        0 0px 15px rgba(0, 0, 0, 0.9);
}

.consumables-search-clear:hover {
    background: var(--color-secondary);
    color: var(--color-primary);
}

/* ===== FILTER BUTTONS ===== */
.consumables-filter-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3));
    /* border-bottom: 1px solid var(--color-secondary); */
}

.consumables-filter-btn {
    padding: 8px 20px;
    background: rgba(10, 10, 10, 0.6);
    border: 2px solid #666;
    border-radius: 10px;
    color: var(--color-text);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: 
        0 0px 5px rgba(0, 0, 0, 0.9),
        0 0px 10px rgba(0, 0, 0, 0.9),
        0 0px 15px rgba(0, 0, 0, 0.9);
}

.consumables-filter-btn:hover {
    border-color: var(--color-primary);
    background: rgba(20, 20, 20, 0.8);
}

.consumables-filter-btn.active {
    background: var(--color-secondary);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* ===== CONSUMABLES GRID ===== */
.consumables-grid-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: rgba(10, 10, 10, 0.3);
    scrollbar-width: thin;
    scrollbar-color: var(--color-secondary) #1a1a1a;
    margin-bottom: 1.5%;
}

.consumables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    justify-items: center;
}

/* Consumable items will be styled in next steps */
.consumable-item {
    width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.consumable-icon {
    width: 55px;
    height: 55px;
    background: rgba(10, 10, 10, 0.9);
    border: 2px solid #666;
    border-radius: 10px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    transition: var(--transition-fast);
    box-shadow: 
        0 0px 5px rgba(0, 0, 0, 0.9),
        0 0px 10px rgba(0, 0, 0, 0.9),
        0 0px 15px rgba(0, 0, 0, 0.9);
}

.consumable-icon:hover {
    border-color: var(--color-primary);
}

/* Quality border colors */
.consumable-icon.quality-0 { border-color: #808080; box-shadow: 0 0 10px #808080 0.5; } /* Trash - Gray */
.consumable-icon.quality-1 { border-color: #FFFFFF; box-shadow: 0 0 10px #FFFFFF 0.5; } /* Normal - White */
.consumable-icon.quality-2 { border-color: #00FF00; box-shadow: 0 0 10px #00FF00 0.5; } /* Fine - Green */
.consumable-icon.quality-3 { border-color: #0080FF; box-shadow: 0 0 10px #0080FF 0.5; } /* Superior - Blue */
.consumable-icon.quality-4 { border-color: #A020F0; box-shadow: 0 0 10px #A020F0 0.5; } /* Epic - Purple */
.consumable-icon.quality-5 { border-color: #FFD700; box-shadow: 0 0 10px #FFD700 0.5; } /* Legendary - Gold */

.consumable-name {
    font-size: 11px;
    color: var(--color-text);
    text-align: center;
    line-height: 1.2;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.9);
}

/* ===== SCROLLBAR STYLING ===== */
.consumables-grid-container::-webkit-scrollbar {
    width: 8px;
}

.consumables-grid-container::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.consumables-grid-container::-webkit-scrollbar-thumb {
    background: var(--color-secondary);
    border-radius: 4px;
}

.consumables-grid-container::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* ===== DRAG & DROP VISUAL FEEDBACK ===== */
.consumable-icon[draggable="true"] {
    cursor: grab;
}

.consumable-icon[draggable="true"]:active {
    cursor: grabbing;
}

/* Valid drop target */
.drag-over-valid {
    background-color: rgba(0, 255, 0, 0.3) !important;
    border: 3px solid var(--color-success) !important;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.8) !important;
    transform: scale(1.05);
    transition: all 0.1s ease;
}

/* Invalid drop target */
.drag-over-invalid {
    background-color: rgba(255, 0, 0, 0.3) !important;
    border: 3px solid var(--color-error) !important;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.8) !important;
    transform: scale(1.05);
    transition: all 0.1s ease;
}

.quick-slot[draggable="true"] {
    cursor: grab;
}

.quick-slot[draggable="true"]:active {
    cursor: grabbing;
}

/* Quality borders for destination slots with consumables */
.consumable-quality-0 { border-color: #808080 !important; box-shadow: 0 0 10px #808080 0.8; } /* Trash - Gray */
.consumable-quality-1 { border-color: #FFFFFF !important; box-shadow: 0 0 10px #FFFFFF 0.8; } /* Normal - White */
.consumable-quality-2 { border-color: #00FF00 !important; box-shadow: 0 0 10px #00FF00 0.8; } /* Fine - Green */
.consumable-quality-3 { border-color: #0080FF !important; box-shadow: 0 0 10px #0080FF 0.8; } /* Superior - Blue */
.consumable-quality-4 { border-color: #A020F0 !important; box-shadow: 0 0 10px #A020F0 0.8; } /* Epic - Purple */
.consumable-quality-5 { border-color: #FFD700 !important; box-shadow: 0 0 10px #FFD700 0.8; } /* Legendary - Gold */

/* ===== TOOLTIP SYSTEM ===== */
.consumables-tooltip {
    position: fixed;
    background: rgba(10, 10, 10, 0.95);
    border: 2px solid var(--color-secondary);
    border-radius: 5px;
    padding: 5px;
    max-width: 350px;
    z-index: 15000;
    pointer-events: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.8);
    font-size: 13px;
    line-height: 1.4;
}

.tooltip-header {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.tooltip-type {
    color: #aaa;
    font-size: 12px;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid #444;
}

.tooltip-requirement {
    color: #ff9900;
    font-size: 12px;
    margin: 3px 0;
}

.tooltip-effect {
    color: #ccc;
    margin: 8px 0;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid var(--color-primary);
}

.tooltip-cooldown {
    color: #66ccff;
    font-size: 11px;
    margin-top: 5px;
}

.tooltip-crafted {
    color: #90EE90;
    font-size: 11px;
    margin-top: 5px;
    font-style: italic;
}

/* ===== LOADING & EMPTY STATES ===== */
.consumables-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--color-primary);
    font-size: 18px;
    font-weight: bold;
}

.consumables-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px;
    text-align: center;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state-text {
    color: #888;
    font-size: 18px;
    margin-bottom: 10px;
}

.empty-state-hint {
    color: #666;
    font-size: 14px;
    font-style: italic;
}