/* ============================================
   INVENTORY MODAL STYLES
   ============================================ */

/* Inventory Modal 전용 스타일 */
/* 공통 기본 배치는 base/modal-common.css, 최종 메뉴 재질은 theme 스타일에서 적용한다. */

/* 장비 제목의 기본 여백과 줄 높이. */
.inventory-modal-wrapper .card.rpg-modal .modal-title {
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

/* Inventory Layout */
.inventory-modal-wrapper .card {
    position: relative;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.inventory-modal-wrapper .inv-header {
    flex-shrink: 0;
}

.inventory-modal-wrapper .inv-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
    overscroll-behavior: contain;
}
.inventory-modal-wrapper[data-detail-open='true'] .inv-container {
    overflow: hidden !important;
    touch-action: none;
}
.inventory-modal-wrapper[data-detail-open='true'] #inv-item-detail {
    overscroll-behavior: contain;
    touch-action: pan-y;
}

#inv-close-btn {
    flex-shrink: 0;
    z-index: 30;
    width: 100%;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--neutral-800);
    cursor: pointer;
}

@media (max-height: 420px) {
    #inv-close-btn {
        position: fixed;
        right: 16px;
        bottom: 18px;
        width: auto;
        max-width: 120px;
    }
    .inventory-modal-wrapper .card {
        padding-bottom: 80px;
    }
}

.inv-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--neutral-800);
    margin-bottom: 10px;
    text-align: center;
}

.inv-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.inv-player {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.inv-slot {
    width: 60px;
    height: 60px;
    background: var(--neutral-900);
    border: 2px dashed #444;
    border-radius: 8px;
    margin: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 15px;
}

.inv-body {
    display: flex;
    align-items: center;
    gap: 12px;
}

.inv-head {
    display: flex;
    justify-content: center;
    width: 100%;
}

.inv-torso {
    width: 56px;
    height: 80px;
    background: var(--neutral-800);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inv-body .inv-slot {
    width: 56px;
    height: 56px;
    margin: 0;
}

.inv-legs {
    display: flex;
}

.inv-section-title {
    width: 100%;
    text-align: left;
    font-size: 14px;
    font-weight: bold;
    color: rgba(255, 214, 120, 0.98);
    text-shadow:
        0 2px 0 rgba(60, 40, 10, 0.9),
        0 10px 24px rgba(0, 0, 0, 0.6);
    margin-top: 16px;
    margin-bottom: 8px;
}

.inv-storage {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inv-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    background: var(--neutral-900);
    padding: 10px;
    border-radius: 8px;
    min-height: 80px;
}

.inv-capacity {
    text-align: right;
    font-size: 12px;
    color: var(--neutral-400);
    margin-top: 5px;
}

.inv-relics {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--neutral-900);
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
}

.inv-item {
    width: 60px;
    height: 60px;
    background: var(--neutral-800);
    border: 1px solid var(--neutral-600);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 15px;
    cursor: pointer;
}

#inv-item-detail {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 40px);
    background: #2a2a2a;
    border: 1px solid var(--primary);
    border-radius: 12px;
    padding: 15px;
    z-index: 10;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    text-align: left;
}

#detail-header {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

#detail-icon {
    font-size: 15px;
}

#detail-name {
    font-size: 14px;
    font-weight: bold;
    flex-grow: 1;
}

#detail-close {
    background: none;
    border: none;
    color: var(--neutral-400);
    font-size: 15px;
    cursor: pointer;
}

#detail-desc {
    white-space: pre-line;
    font-size: 14px;
    color: #ccc;
    margin-bottom: 15px;
}

#detail-actions button {
    width: 100%;
    padding: 10px;
    font-size: 15px;
}

.relic-item {
    background: var(--neutral-800);
    border: 1px solid var(--neutral-600);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
