/* Quality color classes - same as FusionGEN */
.q0 { color: #9d9d9d; } /* Poor - Gray */
.q1 { color: #ffffff; } /* Common - White */
.q2 { color: #1eff00; } /* Uncommon - Green */
.q3 { color: #0070dd; } /* Rare - Blue */
.q4 { color: #a335ee; } /* Epic - Purple */
.q5 { color: #ff8000; } /* Legendary - Orange */
.q6 { color: #e6cc80; } /* Artifact - Gold */
.q7 { color: #00ccff; } /* Heirloom - Light Blue */
.q8 { color: #ffd700; } /* WoW Token - Bright Gold */

/* Wowhead tooltip links */
.wowhead-tooltip-link {
    display: block;
    cursor: pointer;
}

/* Grid column styling with consistent background */
.armory-grid-column {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
    padding: 0.75rem;
    transition: all 0.2s ease;
    min-height: 600px; /* Ensure consistent height */
    background-color: #15171e; /* Consistent background */
}

.armory-grid-column:hover {
    border-color: rgba(255, 255, 255, 0.1); /* No golden border on hover */
    box-shadow: none; /* No box shadow */
}

/* Weapons column - NO fixed height */
.armory-weapons-column {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
    padding: 0.75rem;
    transition: all 0.2s ease;
    min-height: auto; /* Let content determine height */
    background-color: #15171e; /* Consistent background */
}

.armory-weapons-column:hover {
    border-color: rgba(255, 255, 255, 0.1); /* No golden border on hover */
    box-shadow: none; /* No box shadow */
}

/* Make entire slot hoverable */
.armory-item-slot {
    cursor: pointer;
}

/* Ensure item slots are aligned to top */
.armory-item-slot {
    align-items: flex-start !important;
}

/* Socket images */
.socket-image {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

/* Weapons row styling - remove extra spacing */
.weapons-row {
    margin-top: 0;
}

/* Zone image placeholder */
.zone-image-placeholder {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="400" height="200" viewBox="0 0 400 200"><rect width="400" height="200" fill="%231a1a1a"/><path d="M50,50 L350,50 L350,150 L50,150 Z" fill="none" stroke="%23333" stroke-width="2"/><circle cx="200" cy="100" r="30" fill="none" stroke="%23333" stroke-width="2"/><text x="200" y="110" text-anchor="middle" fill="%23666" font-family="Arial" font-size="14">Zone Image</text></svg>');
    background-size: cover;
    background-position: center;
    width: 100%;
}

/* Center column adjustments - remove dark background */
.armory-grid-column .bg-black\/20 {
    background-color: transparent !important;
    border: none !important;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .armory-item-slot {
        padding: 6px 3px;
    }
    
    .armory-grid-column,
    .armory-weapons-column {
        padding: 0.5rem;
        min-height: auto;
    }
    
    .wowhead-tooltip-link {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .weapons-row {
        grid-template-columns: 1fr;
    }
    
    .zone-image-placeholder {
        height: 120px;
    }
}

/* Prevent Wowhead from adding unwanted styles */
a[data-wowhead] {
    background-image: none !important;
}

/* Ensure Wowhead icons display properly */
.wowhead-tooltip-link:after {
    content: '';
    display: none !important;
}

/* Ensure character avatar is at the top */
.armory-grid-column .relative.mb-3 {
    margin-top: 0;
}

/* Full width for zone image in center column */
.armory-grid-column .w-full {
    width: 100% !important;
    max-width: 100% !important;
}

/* Zone image display */
.zone-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.zone-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.zone-image-container:hover img {
    transform: scale(1.05);
}

.zone-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.zone-image-container:hover .zone-image-overlay {
    opacity: 1;
}

.zone-image-overlay i {
    color: #fff;
    font-size: 2rem;
}

/* Zone Modal */
.zone-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.zone-modal.active {
    display: flex;
}

.zone-modal-content {
    max-width: 90%;
    max-height: 90%;
    background: #15171e;
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 0.5rem;
    overflow: hidden;
    position: relative;
}

.zone-modal-header {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.zone-modal-title {
    color: #fff;
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    font-weight: bold;
    text-transform: none;
    font-variant: normal;
}

.zone-modal-close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    transition: background 0.2s ease;
}

.zone-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.zone-modal-body {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zone-modal-image {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 0.25rem;
}

/* Loading state for zone images */
.zone-image-loading {
    background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Touch-friendly zone image for mobile */
@media (max-width: 768px) {
    .zone-image-container {
        height: 150px;
    }
    
    .zone-modal-content {
        max-width: 95%;
        max-height: 80%;
    }
    
    .zone-modal-image {
        max-height: 60vh;
    }
}

/* Fade in animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* Weapons row specific styling from site.css */
.weapons-row {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.375rem;
    padding: 1rem;
    margin-top: 1rem;
    border: 1px solid rgba(199, 179, 119, 0.1);
}

.weapons-row > div {
    transition: all 0.2s ease;
}

.weapons-row > div:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(199, 179, 119, 0.1);
}

/* DPS label styling from site.css */
.dps-label {
    font-size: 0.75rem;
    color: #fbbf24;
    font-weight: bold;
}

/* Socket badges for weapons from site.css */
.socket-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive adjustments for new layout from site.css */
@media (max-width: 1024px) {
    .armory-grid-column {
        min-height: 550px;
    }
}

@media (max-width: 768px) {
    .weapons-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .weapons-row > div {
        padding: 0.75rem;
    }
    
    .zone-image-placeholder {
        height: 100px;
    }
}

/* Word wrap fix for armory item names */
.armory-item-name {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.2;
    max-width: 100%;
    font-size: 0.875rem; /* Consistent with weapons grid */
}

/* Ensure item slots don't overflow */
.armory-grid-column .armory-item-slot {
    min-height: 50px;
}

/* Consistent font sizes for all text in grids */
.armory-grid-column .text-sm {
    font-size: 0.875rem !important;
}

.armory-grid-column .text-xs {
    font-size: 0.75rem !important;
}

.armory-weapons-column .text-sm {
    font-size: 0.875rem !important;
}

.armory-weapons-column .text-xs {
    font-size: 0.75rem !important;
}

/* Consistent background for all grids */
.armory-grid-column,
.armory-weapons-column {
    background-color: #15171e !important;
}

/* Ensure all item names use same font size */
.armory-item-slot .armory-item-name {
    font-size: 0.875rem !important;
}

/* Fix for zone name capitalization */
.zone-display-name {
    text-transform: capitalize;
    font-variant: normal;
}

/* Ensure modal title doesn't get affected */
.zone-modal-title {
    text-transform: none;
    font-variant: normal;
}
