/* Auction House Bot Module Styles */

.ahbot-container {
    padding: 20px;
    border-radius: 8px;
}

.ahbot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-bottom: 2px solid #ddd;
}

.ahbot-header h2 {
    margin: 0;
    font-size: 24px;
}

.realm-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.realm-selector label {
    font-weight: bold;
}

.realm-selector select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.ahbot-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-item {
    font-size: 14px;
}

.ahbot-items {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.ahbot-items table {
    width: 100%;
    border-collapse: collapse;
}

.ahbot-items thead th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.ahbot-items tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s;
}

.ahbot-items tbody td {
    padding: 12px 15px;
    font-size: 14px;
}

.item-cell {
    width: 60px;
}

.item-icon {
    width: 36px;
    height: 36px;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

.item-icon:hover {
    transform: scale(1.1);
    border-color: #ffd700;
}

.item-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.price-cell {
    font-weight: 600;
}

.price {
    font-family: 'Courier New', monospace;
}

.ahbot-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pagination-link {
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.2s;
}

.pagination-current {
    padding: 8px 16px;
    font-weight: 600;
}

.ahbot-empty {
    text-align: center;
    padding: 60px 20px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ahbot-empty p {
    font-size: 18px;
    margin: 0;
}

.ahbot-error {
    padding: 20px;
}

.ahbot-error .alert {
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid #e53e3e;
}

.ahbot-error h4 {
    margin-top: 0;
    margin-bottom: 10px;
}

/* Override nice_table styles for AH-Bot tables */
.ah-items-table.nice_table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-bottom: 20px !important;
}

.ah-items-table.nice_table thead tr th {
    padding: 12px 15px !important;
    text-align: left !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: 12px !important;
    letter-spacing: 0.5px !important;
    font-family: inherit !important;
    font-style: normal !important;
}

.ah-items-table.nice_table tbody tr {
    border-bottom: 1px solid #e2e8f0 !important;
    transition: background-color 0.2s !important;
}

.ah-items-table.nice_table tbody tr td {
    padding: 12px 15px !important;
    font-size: 14px !important;
    font-weight: normal !important;
    font-style: normal !important;
    font-family: inherit !important;
}

.ah-items-table.nice_table tbody tr:first-child td {
    padding: 12px 15px !important;
    font-size: 14px !important;
    font-weight: normal !important;
    font-style: normal !important;
    font-family: inherit !important;
}

/* AJAX View Specific Styles */
.ahbot-ajax-container {
    padding: 20px;
}


.ahbot-controls {
    display: flex;
    gap: 20px;
    align-items: center;
}

.ah-search-box input {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 250px;
    font-size: 14px;
}

.ahbot-content {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.ahbot-sidebar {
    width: 250px;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sidebar-title {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.ah-categories-list {
    max-height: 600px;
    overflow-y: auto;
}

.ah-category,
.ah-subcategory {
    padding: 10px;
    margin: 5px 0;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.ah-category:hover,
.ah-subcategory:hover {
    background: #777373;
}

.ah-category.active {
    background: #4a5568;
}

.ah-subcategory.active {
    background: #777373;
}

.ah-subcategory {
    padding-left: 25px;
    font-size: 13px;
}

.ah-subcategory .indent {
    padding-left: 5px;
}

.ahbot-main {
    flex: 1;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-height: 500px;
}

.item-icon-cell {
    width: 50px;
}

/* WoW Item Quality Colors */
.item-link {
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

.item-link:hover {
    text-decoration: underline;
}

/* Quality color classes (standard WoW colors) */
.q0, .item-link.q0 { color: #9d9d9d !important; } /* Poor (Gray) */
.q1, .item-link.q1 { color: #ffffff !important; } /* Common (White) */
.q2, .item-link.q2 { color: #1eff00 !important; } /* Uncommon (Green) */
.q3, .item-link.q3 { color: #0070dd !important; } /* Rare (Blue) */
.q4, .item-link.q4 { color: #a335ee !important; } /* Epic (Purple) */
.q5, .item-link.q5 { color: #ff8000 !important; } /* Legendary (Orange) */
.q6, .item-link.q6 { color: #e6cc80 !important; } /* Artifact (Gold) */
.q7, .item-link.q7 { color: #00ccff !important; } /* Heirloom (Light Blue) */

.item-name {
    font-weight: 500;
    cursor: pointer;
}

.item-name:hover {
    text-decoration: underline;
}

.price-cell {
    font-family: 'Courier New', monospace !important;
}

.price-gold {
    color: #ffd700;
    font-weight: bold;
}

.price-silver {
    color: #c0c0c0;
}

.price-copper {
    color: #b87333;
}

.time-short {
    font-weight: 500;
}

.time-medium {
    font-weight: 500;
}

.time-long {
    font-weight: 500;
}

.time-expired {
    font-style: italic;
}

.ah-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid #e2e8f0;
}

.pagination-stats {
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    gap: 5px;
}

.ah-page-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

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

.ah-empty {
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
}

.ah-error {
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
}

.ah-loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ahbot-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .ahbot-stats {
        flex-direction: column;
        gap: 10px;
    }

    .ahbot-items {
        overflow-x: auto;
    }

    .ahbot-items table,
    .ah-items-table {
        min-width: 600px;
    }

    .ahbot-pagination,
    .ah-pagination {
        flex-direction: column;
        gap: 15px;
        flex-wrap: wrap;
    }

    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }

    .ahbot-content {
        flex-direction: column;
    }

    .ahbot-sidebar {
        width: 100%;
    }

    .ahbot-controls {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .ah-search-box input {
        width: 100%;
    }
}
