/**
 * Midnight Expansion - Housing Module Styles
 */

.housing-module {
    animation: fadeIn 0.6s ease-out;
    color: #e2e8f0;
}

.housing-module .glass-panel {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 24px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(139, 92, 246, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.housing-module .glass-panel:hover {
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(139, 92, 246, 0.2);
}

.housing-module .module-header {
    text-align: center;
    border: 2px solid rgba(139, 92, 246, 0.5);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(15, 23, 42, 0.9));
    padding: 3.5rem 2rem;
}

.housing-module h1 {
    font-size: 3.5rem;
    color: #fff;
    text-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
    margin-bottom: 0.8rem;
    letter-spacing: -0.02em;
}

.housing-module .module-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

.housing-module h2 {
    color: #a78bfa;
    font-size: 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-left: 5px solid #8b5cf6;
    padding-left: 1.5rem;
}

.housing-module .card {
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 18px;
    padding: 1.8rem;
    margin-top: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.housing-module .alert-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.housing-module .alert-box.info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.housing-module .neighborhood-types {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.housing-module .type-card {
    padding: 1.2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.housing-module .type-card.public {
    background: rgba(59, 130, 246, 0.1);
}

.housing-module .type-card.private {
    background: rgba(16, 185, 129, 0.1);
}

.housing-module .dashboard-list {
    list-style: none;
    padding: 0;
}

.housing-module .dashboard-list li {
    padding: 0.8rem;
    border-left: 3px solid #a78bfa;
    background: rgba(139, 92, 246, 0.05);
    margin-bottom: 0.5rem;
    border-radius: 0 8px 8px 0;
}

/* Accordion for Vendors */
.vendor-accordion {
    margin-top: 2rem;
}

.vendor-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.vendor-card.active {
    border-color: rgba(139, 92, 246, 0.7);
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.15);
}

.vendor-header {
    padding: 1.2rem 1.8rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(139, 92, 246, 0.05);
    transition: background 0.3s ease;
}

.vendor-header:hover {
    background: rgba(139, 92, 246, 0.1);
}

.vendor-header .npc-info h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.vendor-header .coords {
    color: #94a3b8;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.vendor-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0, 1, 0, 1);
    background: rgba(15, 23, 42, 0.2);
}

.vendor-card.active .vendor-content {
    max-height: 2000px;
    transition: max-height 0.4s ease-in;
}

/* Item Tables */
.item-table-container {
    padding: 1.5rem;
    overflow-x: auto;
}

.item-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

.item-table th {
    text-align: left;
    padding: 1rem;
    border-bottom: 2px solid rgba(139, 92, 246, 0.3);
    color: #a78bfa;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.item-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.item-table tr:hover {
    background: rgba(139, 92, 246, 0.05);
}

.item-name-cell {
    font-weight: 600;
    color: #e2e8f0;
}

.price-cell {
    color: #fbbf24;
    font-weight: bold;
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
}

.item-preview img {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    border: 1px solid rgba(139, 92, 246, 0.4);
    transition: transform 0.2s ease;
    cursor: pointer;
}

.item-preview img:hover {
    transform: scale(3) translate(-10px, -10px);
    z-index: 100;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

/* Stats */
.housing-stats {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(15, 23, 42, 0.6));
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.housing-stats h3 {
    color: #10b981 !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .housing-module .module-grid {
        grid-template-columns: 1fr;
    }

    .housing-module .full-width {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .housing-module h1 {
        font-size: 2rem;
    }

    .housing-module .glass-panel {
        padding: 1.5rem;
    }

    .housing-module .neighborhood-types {
        grid-template-columns: 1fr;
    }

    .vendor-header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .item-table th:nth-child(2),
    .item-table td:nth-child(2) {
        display: none;
    }

    /* Hide price on small mobile? Maybe not. */
}