/* WoW-Style Auction House Panel - MorrHollow Theme (Landscape Optimized) */
/* This panel is nested inside economy-hub-body, similar to marketplace-panel */

.auction-house-panel {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    font-family: 'RemiliaMincho', serif;
    color: #E5E7EB;
    background: transparent; /* Economy hub provides background */
    overflow: hidden;
}

/* Header - Hide when nested in economy-hub */
.auction-house-panel .panel-header {
    display: none; /* Economy hub provides header */
}

/* Tabs - Hide when nested in economy-hub */
.auction-tabs {
    display: none; /* Economy hub provides tabs */
}

/* Body */
.auction-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Critical for flex overflow */
}

/* Browse Container - Landscape Split Layout */
.browse-container {
    display: flex;
    width: 100%;
    height: 100%;
    gap: 12px;
    padding: 12px;
    overflow: hidden;
}

/* Left Sidebar - Categories & Filters */
.browse-sidebar {
    width: 240px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
    overflow-y: auto;
}

.browse-sidebar::-webkit-scrollbar {
    width: 4px;
}

.browse-sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.browse-sidebar::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 2px;
}

/* Main Content Area */
.browse-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0; /* Critical for flex overflow */
}

.sidebar-title {
    font-size: 10px;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.9);
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Categories */
.category-list {
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.3) 0%,
        rgba(51, 65, 85, 0.5) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    padding: 12px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    margin-bottom: 4px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    color: rgba(186, 166, 116, 0.7);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s ease;
    width: 100%;
    text-align: left;
}

.category-item:last-child {
    margin-bottom: 0;
}

.category-item:hover {
    background: linear-gradient(180deg,
        rgba(51, 65, 85, 0.4) 0%,
        rgba(30, 41, 59, 0.6) 100%);
    border-color: rgba(212, 175, 55, 0.3);
    color: rgba(212, 175, 55, 0.9);
}

.category-item.active {
    background: linear-gradient(180deg,
        rgba(51, 65, 85, 0.6) 0%,
        rgba(30, 41, 59, 0.8) 100%);
    border-color: rgba(212, 175, 55, 0.5);
    color: rgba(212, 175, 55, 1);
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.2);
}

.category-icon {
    font-size: 14px;
}

.category-name {
    flex: 1;
    font-size: 10px;
}

/* Filters */
.filter-section {
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.3) 0%,
        rgba(51, 65, 85, 0.5) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    padding: 12px;
}

.filter-group {
    margin-bottom: 12px;
}

.filter-group:last-of-type {
    margin-bottom: 0;
}

.filter-label {
    display: block;
    font-size: 9px;
    font-weight: 600;
    color: rgba(186, 166, 116, 0.7);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select,
.level-input,
.price-input {
    width: 100%;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(51, 65, 85, 0.8) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 4px;
    color: #E5E7EB;
    padding: 6px 8px;
    font-family: 'RemiliaMincho', serif;
    font-size: 10px;
    outline: none;
    transition: all 0.15s ease;
}

.filter-select:focus,
.level-input:focus,
.price-input:focus {
    border-color: rgba(212, 175, 55, 0.5);
    background: linear-gradient(180deg,
        rgba(51, 65, 85, 0.8) 0%,
        rgba(30, 41, 59, 0.9) 100%);
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.2);
}

.level-range,
.price-range {
    display: flex;
    align-items: center;
    gap: 6px;
}

.level-input,
.price-input {
    flex: 1;
}

.level-separator,
.price-separator {
    font-size: 10px;
    color: rgba(186, 166, 116, 0.5);
}

.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
}

.btn-apply-filters,
.btn-reset-filters {
    padding: 6px 12px;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(51, 65, 85, 0.8) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 4px;
    color: rgba(186, 166, 116, 0.8);
    font-family: 'RemiliaMincho', serif;
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
}

.btn-apply-filters:hover,
.btn-reset-filters:hover {
    background: linear-gradient(180deg,
        rgba(51, 65, 85, 0.8) 0%,
        rgba(30, 41, 59, 0.9) 100%);
    border-color: rgba(212, 175, 55, 0.5);
    color: rgba(212, 175, 55, 0.9);
}

.btn-reset-filters {
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.4) 0%,
        rgba(51, 65, 85, 0.6) 100%);
    border-color: rgba(212, 175, 55, 0.2);
    color: rgba(186, 166, 116, 0.6);
}

/* Search Bar */
.search-bar {
    padding: 12px;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.15) 0%,
        rgba(51, 65, 85, 0.2) 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    flex-shrink: 0;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    font-size: 14px;
    color: rgba(186, 166, 116, 0.6);
    pointer-events: none;
}

.search-input {
    width: 100%;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(51, 65, 85, 0.8) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    color: #E5E7EB;
    padding: 8px 12px 8px 38px;
    font-family: 'RemiliaMincho', serif;
    font-size: 11px;
    outline: none;
    transition: all 0.15s ease;
}

.search-input::placeholder {
    color: rgba(186, 166, 116, 0.4);
}

.search-input:focus {
    border-color: rgba(212, 175, 55, 0.5);
    background: linear-gradient(180deg,
        rgba(51, 65, 85, 0.8) 0%,
        rgba(30, 41, 59, 0.9) 100%);
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.2);
}

/* Sort Bar */
.sort-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    flex-shrink: 0;
}

.sort-label {
    font-size: 9px;
    color: rgba(186, 166, 116, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 8px;
}

.sort-option {
    padding: 4px 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    color: rgba(186, 166, 116, 0.6);
    font-size: 9px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sort-option:hover {
    background: rgba(51, 65, 85, 0.4);
    color: rgba(212, 175, 55, 0.9);
}

.sort-option.active {
    background: rgba(51, 65, 85, 0.6);
    border-color: rgba(212, 175, 55, 0.5);
    color: rgba(212, 175, 55, 1);
}

/* Auction List - Scrollable Table */
.auction-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
}

.auction-list::-webkit-scrollbar {
    width: 6px;
}

.auction-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.auction-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg,
        rgba(212, 175, 55, 0.4) 0%,
        rgba(186, 166, 116, 0.6) 100%);
    border-radius: 3px;
}

.auction-list-header {
    display: grid;
    grid-template-columns: 2fr 70px 100px 120px 120px 90px 160px;
    gap: 10px;
    padding: 10px 12px;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.5) 0%,
        rgba(51, 65, 85, 0.7) 100%);
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
    font-size: 9px;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.auction-list-body {
    flex: 1;
}

.auction-row {
    display: grid;
    grid-template-columns: 2fr 70px 100px 120px 120px 90px 160px;
    gap: 10px;
    padding: 10px 12px;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.2) 0%,
        rgba(51, 65, 85, 0.3) 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.08);
    transition: all 0.15s ease;
    align-items: center;
}

.auction-row:hover {
    background: linear-gradient(180deg,
        rgba(51, 65, 85, 0.4) 0%,
        rgba(30, 41, 59, 0.5) 100%);
    border-color: rgba(212, 175, 55, 0.2);
    box-shadow: inset 0 0 10px rgba(212, 175, 55, 0.1);
}

/* Rarity borders */
.auction-row.legendary {
    border-left: 3px solid rgba(255, 140, 0, 0.8);
}

.auction-row.epic {
    border-left: 3px solid rgba(163, 53, 238, 0.8);
}

.auction-row.rare {
    border-left: 3px solid rgba(59, 130, 246, 0.8);
}

.auction-row.uncommon {
    border-left: 3px solid rgba(34, 197, 94, 0.8);
}

.auction-row.common {
    border-left: 3px solid rgba(156, 163, 175, 0.6);
}

/* Item Info */
.item-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.item-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.item-details {
    flex: 1;
    min-width: 0;
}

.item-name {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 2px;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-name.legendary {
    color: rgba(255, 140, 0, 1);
}

.item-name.epic {
    color: rgba(163, 53, 238, 1);
}

.item-name.rare {
    color: rgba(59, 130, 246, 1);
}

.item-name.uncommon {
    color: rgba(34, 197, 94, 1);
}

.item-name.common {
    color: rgba(156, 163, 175, 1);
}

.item-category {
    font-size: 8px;
    color: rgba(186, 166, 116, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.level-badge {
    display: inline-block;
    padding: 3px 6px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 3px;
    font-size: 9px;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.9);
}

.seller-name {
    font-size: 10px;
    color: rgba(186, 166, 116, 0.8);
}

.bid-info,
.buyout-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bid-amount,
.buyout-amount {
    font-size: 11px;
    font-weight: 700;
    color: rgba(212, 175, 55, 1);
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.5);
}

.bid-currency,
.buyout-currency {
    font-size: 8px;
    color: rgba(186, 166, 116, 0.6);
}

.bid-count {
    font-size: 8px;
    color: rgba(186, 166, 116, 0.5);
    font-style: italic;
}

.time-left {
    font-size: 10px;
    font-weight: 600;
    padding: 4px 6px;
    border-radius: 3px;
    display: inline-block;
}

.time-left.critical {
    background: rgba(239, 68, 68, 0.2);
    color: rgba(239, 68, 68, 1);
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.time-left.warning {
    background: rgba(251, 191, 36, 0.2);
    color: rgba(251, 191, 36, 1);
    border: 1px solid rgba(251, 191, 36, 0.4);
}

.time-left.normal {
    background: rgba(34, 197, 94, 0.2);
    color: rgba(34, 197, 94, 1);
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.col-actions {
    display: flex;
    gap: 4px;
}

.btn-bid,
.btn-buyout {
    padding: 5px 10px;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(51, 65, 85, 0.8) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 3px;
    color: rgba(186, 166, 116, 0.8);
    font-family: 'RemiliaMincho', serif;
    font-size: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-bid:hover,
.btn-buyout:hover {
    background: linear-gradient(180deg,
        rgba(51, 65, 85, 0.8) 0%,
        rgba(30, 41, 59, 0.9) 100%);
    border-color: rgba(212, 175, 55, 0.5);
    color: rgba(212, 175, 55, 0.9);
    transform: translateY(-1px);
}

.btn-buyout {
    border-color: rgba(34, 197, 94, 0.4);
}

.btn-buyout:hover {
    border-color: rgba(34, 197, 94, 0.6);
    color: rgba(34, 197, 94, 1);
}

/* Empty State */
.empty-auctions,
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: rgba(186, 166, 116, 0.4);
    text-align: center;
    flex: 1;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.3;
}

.empty-message {
    font-size: 12px;
    margin-bottom: 6px;
    color: rgba(186, 166, 116, 0.6);
}

.empty-hint {
    font-size: 10px;
    font-style: italic;
    margin-bottom: 16px;
}

.btn-create-auction {
    padding: 10px 20px;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(51, 65, 85, 0.8) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    color: rgba(186, 166, 116, 0.8);
    font-family: 'RemiliaMincho', serif;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-create-auction:hover {
    background: linear-gradient(180deg,
        rgba(51, 65, 85, 0.8) 0%,
        rgba(30, 41, 59, 0.9) 100%);
    border-color: rgba(212, 175, 55, 0.5);
    color: rgba(212, 175, 55, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.15) 0%,
        rgba(51, 65, 85, 0.2) 100%);
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    flex-shrink: 0;
}

.page-btn {
    padding: 6px 12px;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(51, 65, 85, 0.8) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 4px;
    color: rgba(186, 166, 116, 0.8);
    font-size: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.page-btn:hover:not(:disabled) {
    background: linear-gradient(180deg,
        rgba(51, 65, 85, 0.8) 0%,
        rgba(30, 41, 59, 0.9) 100%);
    border-color: rgba(212, 175, 55, 0.5);
    color: rgba(212, 175, 55, 0.9);
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.page-info {
    font-size: 10px;
    color: rgba(186, 166, 116, 0.6);
}

/* Responsive */
@media (max-width: 1200px) {
    .browse-sidebar {
        width: 200px;
    }

    .auction-list-header,
    .auction-row {
        grid-template-columns: 2fr 60px 90px 110px 110px 80px 140px;
    }
}

@media (max-width: 900px) {
    .browse-container {
        flex-direction: column;
    }

    .browse-sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .category-list,
    .filter-section {
        flex: 1;
        min-width: 200px;
    }

    .auction-list-header,
    .auction-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .auction-row {
        padding: 16px;
    }

    .col-actions {
        justify-content: flex-end;
    }
}
