/* --- Item Detail Popup Modal --- */
.item-popup-content {
    background-color: #1a1a1f;
    margin: 5% auto;
    /* 5% from top and centered */
    width: 400px;
    /* Fixed width like DIM */
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8);
    border: 1px solid #444;
    color: #fff;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    /* For header border radius */
}

.close-popup {
    color: #aaa;
    position: absolute;
    top: 5px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
}

.close-popup:hover {
    color: #fff;
}

/* Header */
.popup-header {
    padding: 10px;
    display: flex;
    align-items: center;
    /* Default Blue Gradient */
    background: linear-gradient(to right, #2a3a4a, #1a1a1f);
    border-top: 4px solid #4881ae;
}

.popup-header.exotic {
    background: linear-gradient(to right, #ceae33, #1a1a1f);
    border-top: 4px solid #f2c733;
}

.popup-header.legendary {
    background: linear-gradient(to right, #522f65, #1a1a1f);
    border-top: 4px solid #8e44ad;
}

.header-icon-container img {
    width: 48px;
    height: 48px;
    background-color: #000;
    border: 1px solid #aaa;
}

.header-info {
    margin-left: 10px;
    flex-grow: 1;
}

.header-info h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.header-subtext {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    gap: 10px;
}

.header-power {
    font-size: 1.5rem;
    font-weight: 300;
    color: #f2c733;
    /* Power Yellow */
    display: flex;
    align-items: center;
}

.power-icon {
    font-size: 1rem;
    margin-right: 2px;
}

/* Body */
.popup-body {
    padding: 15px;
    background-color: #232326;
}

/* Stats */
.popup-section {
    margin-bottom: 20px;
}

.popup-section h3 {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    color: #888;
    text-transform: uppercase;
    border-bottom: 1px solid #444;
    padding-bottom: 3px;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-row {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.stat-label {
    width: 80px;
    /* Fixed label width */
    text-align: right;
    padding-right: 10px;
    color: #ccc;
    font-size: 0.85rem;
}

.stat-bar-container {
    flex-grow: 1;
    height: 14px;
    background-color: #444;
    position: relative;
    margin-right: 10px;
}

.stat-bar-fill {
    background-color: #fff;
    height: 100%;
}

.stat-value {
    width: 30px;
    text-align: right;
    font-weight: bold;
}

/* Sockets */
.socket-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.socket-icon {
    width: 40px;
    height: 40px;
    background-color: #111;
    border: 1px solid #555;
    padding: 2px;
    position: relative;
}

.socket-icon img {
    width: 100%;
    height: 100%;
}

.socket-icon.intrinsic {
    width: 48px;
    height: 48px;
    /* Slightly bigger */
    border-color: #d4ac0d;
    /* Gold border for intrinsic if desired */
}