﻿/* =================================================
   Door Wrap
   ================================================= */
.door-wrap {
    position: absolute;
    width: auto;
    text-align: center;
}

/* =================================================
   Door Icon Base
   ================================================= */
.door-icon {
    position: relative;
    width: 64px;
    height: 64px;
    display: block;
    will-change: transform;
    z-index: 10;
    transition: color 0.15s ease, filter 0.2s ease;
}

.door-svg {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
}

/* =================================================
   Door Color States
   ================================================= */
.door-icon.state-normal {
    color: #6b7280;
}

.door-icon.state-open {
    color: #2F8F88;
}

.door-icon.state-closed {
    color: #F89B6C;
}

.door-icon.selected {
    color: #ff3b30 !important; /* 눈에 잘 띄는 빨강 */
}

.door-icon.disconnected .door-overlay,
.door-icon.disconnected .door-overlay img {
    filter: none !important;
}

/* =================================================
   Overlay
   ================================================= */
/* overlay 공통 */
.door-overlay {
    position: absolute;
    pointer-events: none;
    z-index: 50; /* badge보다 위 */
}

    /* stop 아이콘 중앙 고정 */
    .door-overlay.ov-center {
        position: absolute;
        inset: 0; /* ⭐ 전체 영역 채움 */
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: none;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 75%;
        height: 75%;
        min-width: 24px;
        min-height: 24px;
        max-width: 128px;
        max-height: 128px;
    }

        .door-overlay.ov-center img {
            width: 70%; /* 크기만 조절 */
            height: 70%;
            object-fit: contain;
        }

/* =================================================
   Badge Row
   ================================================= */
.door-badges {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 6px;
    z-index: 60;
    pointer-events: none;
}

.door-badge {
    width: var(--badge-size, 18px);
    height: var(--badge-size, 18px);
    min-width: 20px;
    min-height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,0,0,0.4);
    box-shadow: 0 2px 4px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.35) inset, 0 -1px 0 rgba(0,0,0,0.25) inset;
}

    .door-badge img {
        width: 70%;
        height: 70%;
        display: block;
    }

    /* 관리자 Badge */
    .door-badge.admin {
        background: linear-gradient( to bottom, rgba(255,110,110,0.95), rgba(220,38,38,0.95) );
    }

    /* 스케줄 Badge */
    .door-badge.schedule {
        background: linear-gradient( to bottom, rgba(255,140,140,0.95), rgba(185,28,28,0.95) );
    }

/* =================================================
   Door Label
   ================================================= */
.door-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 4px;
    padding: 2px 6px;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
    background: rgba(0,0,0,0.65);
    color: #fffff0;
    border-radius: 4px;
    pointer-events: none;
}

.door-size-label {
    position: absolute;
    top: -20px; /* 위쪽 위치 */
    left: 50%;
    transform: translateX(-50%);
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000; /* 검은 배경 */
    color: #fff; /* 흰 글자 */
    font-size: 10px; /* 기존보다 키움 */
    font-weight: 600;
    border-radius: 50px; /* 원형 */
    line-height: 1;
    pointer-events: none;
    white-space: nowrap;
}
