/* ===== V2 Panel - 좌측 슬라이드 패널 ===== */

.v2-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 320px;
    height: 100%;
    background: #fff;
    box-shadow: 2px 0 8px rgba(0,0,0,0.15);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 10;
    display: flex;
    flex-direction: column;
}

.v2-panel.open {
    transform: translateX(0);
}

/* 패널 헤더 */
.v2-panel-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    color: #333;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
    gap: 8px;
}

.v2-panel-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    flex: 1;
    display: flex;
    align-items: center;
}

.v2-panel-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.15s;
}

.v2-panel-close:hover {
    color: #e53935;
}

/* 패널 바디 */
.v2-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* 검색 입력 영역 */
.v2-panel-search {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.v2-panel-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

.v2-panel-input:focus {
    border-color: #3498db;
}

.v2-panel-btn {
    padding: 8px 16px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}

.v2-panel-btn:hover {
    background: #2980b9;
}

/* 결과 리스트 */
.v2-panel-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.v2-panel-list-item {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.5;
}

.v2-panel-list-item:hover {
    background: #f0f7ff;
}

.v2-panel-list-item.selected {
    background: #e8f4fd;
    border-left: 3px solid #3498db;
}

.v2-panel-list-item strong {
    font-size: 14px;
    color: #333;
}

.v2-panel-list-item small {
    color: #888;
}

.v2-panel-loading,
.v2-panel-empty {
    padding: 20px 12px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

.v2-panel-more {
    padding: 12px;
    text-align: center;
    color: #3498db;
    font-size: 13px;
    cursor: pointer;
    border-top: 1px solid #eee;
}

.v2-panel-more:hover {
    background: #f0f7ff;
}

/* ===== 공통: 카드 우측상단 삭제 버튼 (hover 시만 표시) ===== */
.v2-card-delete-float {
    position: absolute; top: 4px; right: 4px; z-index: 3;
    width: 20px; height: 20px;
    border: none; border-radius: 3px; background: rgba(255,255,255,0.95);
    cursor: pointer; display: none; align-items: center; justify-content: center;
    color: #bbb; transition: all 0.15s; padding: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.v2-card-delete-float:hover { color: #e53935; background: #ffebee; }
/* 부모 카드 hover 시 표시 */
.drone-card:hover > .v2-card-delete-float,
.spatial-list-item:hover > .v2-card-delete-float,
.field-list-item:hover > .v2-card-delete-float { display: flex; }

/* ===== 주소검색 최근검색어 드롭다운 ===== */
.addr-search-wrap {
    position: relative;
    flex-shrink: 0;
}

/* 위치검색 패널: 검색창 고정, 하단 콘텐츠만 스크롤 */
.v2-panel-body:has(.addr-search-wrap) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.v2-panel-body:has(.addr-search-wrap) > .addr-search-wrap {
    flex-shrink: 0;
}
.addr-scroll-area {
    flex: 1 1 0;
    overflow-y: auto;
    min-height: 0;
}
.addr-scroll-area::-webkit-scrollbar { width: 4px; }
.addr-scroll-area::-webkit-scrollbar-thumb { background: #d0d0d0; border-radius: 2px; }
.addr-recent-dropdown {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    z-index: 20;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    overflow: hidden;
    animation: addrRecentIn 0.15s ease;
}
.addr-recent-dropdown.open { display: block; }

@keyframes addrRecentIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.addr-recent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px 6px;
    border-bottom: 1px solid #f0f0f0;
}
.addr-recent-title {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    display: flex;
    align-items: center;
    gap: 4px;
}
.addr-recent-clear {
    font-size: 10px;
    color: #bbb;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: all 0.15s;
}
.addr-recent-clear:hover {
    color: #e53935;
    background: #fef2f2;
}

.addr-recent-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 295px;
    overflow-y: auto;
}
.addr-recent-list::-webkit-scrollbar { width: 3px; }
.addr-recent-list::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

.addr-recent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 12px;
    transition: background 0.1s;
}
.addr-recent-item:hover {
    background: #f5faff;
}
.addr-recent-keyword {
    flex: 1;
    font-size: 13px;
    color: #444;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.addr-recent-keyword:hover {
    color: #1565c0;
}
.addr-recent-del {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    border-radius: 3px;
    transition: all 0.15s;
    opacity: 0;
}
.addr-recent-item:hover .addr-recent-del {
    opacity: 1;
}
.addr-recent-del:hover {
    color: #e53935;
    background: #fef2f2;
}

/* ===== 주소검색 안내 가이드 ===== */
.addr-guide {
    padding: 16px;
}
.addr-guide-hero {
    text-align: center;
    padding: 20px 0 16px;
}
.addr-guide-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px; height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8f4fd, #d1ecf9);
    margin-bottom: 12px;
}
.addr-guide-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(52,152,219,0.3);
    animation: addrPulse 2s ease-out infinite;
}
@keyframes addrPulse {
    0%   { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.3); opacity: 0; }
}
.addr-guide-title {
    font-size: 15px; font-weight: 700; color: #333; margin-bottom: 4px;
}
.addr-guide-sub {
    font-size: 12px; color: #888;
}

/* 카드 그리드 */
.addr-guide-cards {
    display: flex; flex-direction: column; gap: 8px;
    margin-top: 16px;
}
.addr-guide-card {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.addr-guide-card:hover {
    border-color: #d0e8f7;
    box-shadow: 0 2px 8px rgba(52,152,219,0.08);
}
.addr-guide-card-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.addr-guide-card-text {
    display: flex; flex-direction: column; gap: 2px;
}
.addr-guide-card-text strong {
    font-size: 12px; font-weight: 700; color: #333;
}
.addr-guide-card-text span {
    font-size: 11px; color: #999;
}

/* 검색 예시 */
.addr-guide-examples {
    margin-top: 16px;
    padding: 14px;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
}
.addr-guide-ex-title {
    font-size: 11px; font-weight: 600; color: #999;
    margin-bottom: 10px;
}
.addr-guide-ex-item {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: #555;
    padding: 5px 0;
}
.addr-guide-ex-badge {
    font-size: 9px; font-weight: 700;
    padding: 2px 8px;
    border-radius: 8px;
    background: #e8f4fd; color: #3498db;
    white-space: nowrap;
    flex-shrink: 0;
}
.addr-guide-ex-badge.bg-orange { background: #fef3e2; color: #f39c12; }
.addr-guide-ex-badge.bg-green { background: #e8f8f0; color: #27ae60; }

/* 하단 출처 */
.addr-guide-footer {
    display: flex; align-items: center; justify-content: center;
    gap: 5px;
    padding: 10px 0 0;
    margin-top: 14px;
    border-top: 1px solid #f0f0f0;
    font-size: 10px; color: #bbb;
    white-space: nowrap;
}
