/**
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * ⚡ APC System - Filter Stylesheet
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * 📁 파일명: /www/_acc/css/filter.css
 * 📌 버전: v1.1
 * 📅 작성일: 2025-12-17
 * 📝 설명: ★ 중앙 정렬 수정 + 날짜/정렬 드롭다운 추가
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * Filter Bar - 가로 스크롤 (스크롤바 숨김)
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.filter-bar { 
    margin: 0;
    padding: 15px 20px;
    display: flex; 
    flex-wrap: nowrap;
    gap: 12px;
    background: var(--bg);
    border-bottom: 1px solid #fde68a;
    align-items: center;
}

.filter-buttons {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 0px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    user-select: none;
    align-items: center;  /* ★ 추가: 버튼 수직 정렬 */
}

.filter-buttons::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    height: 38px;
    padding: 0 18px; 
    border-radius: 19px; 
    border: 1px solid #fde68a; 
    background: white; 
    color: #92400e; 
    text-decoration: none; 
    font-size: 0.9rem;
    line-height: 36px;  /* ★ border 제외 높이 */
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;  /* ★ 추가 */
    align-items: center;   /* ★ 추가: 텍스트 수직 중앙 */
    justify-content: center;
}

.filter-btn:hover {
    background: #fef3c7;
}

.filter-btn.active { 
    background: linear-gradient(135deg, #f59e0b 0%, #FF6B35 100%);
    color: white; 
    border-color: #FF6B35; 
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * 검색 + 필터 + 결과 (한 행)
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.search-result-row {
    display: flex;
    align-self: center;
    gap: 8px;
    flex-shrink: 0;
}

/* 결과 수 표시 */
.result-count {
    display: inline-flex;  /* ★ 변경 */
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: white;
    height: 38px;
    padding: 0 18px;
    border-radius: 19px;
    border: 1px solid #fde68a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.count-number {
    font-size: 1.1rem;
    font-weight: 800;
    color: #FF6B35;
    line-height: 1;  /* ★ 추가 */
}

.count-label {
    font-size: 0.85rem;
    color: #92400e;
    font-weight: 600;
    line-height: 1;  /* ★ 추가 */
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * 검색 폼
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.search-form {
    display: inline-flex;  /* ★ 변경 */
    align-items: center;
    gap: 8px;
    background: white;
    height: 38px;
    padding: 0 4px 0 14px;
    border-radius: 19px;
    border: 1px solid #fde68a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.search-input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.9rem;
    width: 150px;
    color: #1f2937;
    line-height: 36px;  /* ★ 추가: 높이에 맞춤 */
    height: 36px;       /* ★ 추가 */
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-btn {
    background: var(--primary);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: inline-flex;  /* ★ 변경 */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.search-btn:hover {
    background: var(--primary-hover);
}

.search-btn svg {
    stroke: white;
}

.search-clear {
    color: #9ca3af;
    text-decoration: none;
    font-size: 1rem;
    padding: 4px 8px;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;  /* ★ 추가 */
}

.search-clear:hover {
    color: #ef4444;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * ★★★ [Phase 2] 필터 아이콘 버튼 (날짜/정렬)
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.filter-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: white;
    border: 1px solid #fde68a;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.filter-icon-btn:hover {
    background: #fef3c7;
    border-color: #f59e0b;
}

.filter-icon-btn.active {
    background: linear-gradient(135deg, #f59e0b 0%, #FF6B35 100%);
    border-color: #FF6B35;
}

.filter-icon-btn.active i {
    color: white;
}

.filter-icon-btn i {
    font-size: 1rem;
    color: #92400e;
    transition: color 0.2s;
}

/* 활성 표시 점 */
.filter-icon-btn .active-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
    display: none;
}

.filter-icon-btn.has-filter .active-dot {
    display: block;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * ★★★ [Phase 2] 드롭다운 메뉴 공통 스타일
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.filter-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border: 1px solid #fde68a;
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.filter-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.filter-dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid #fde68a;
    font-weight: 700;
    font-size: 0.85rem;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-dropdown-header i {
    color: #f59e0b;
}

.filter-dropdown-body {
    padding: 8px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * ★★★ [Phase 2] 정렬 옵션 드롭다운
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.sort-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.85rem;
    color: #4b5563;
}

.sort-option:hover {
    background: #fef3c7;
}

.sort-option.active {
    background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
    color: #FF6B35;
    font-weight: 600;
}

.sort-option i {
    width: 20px;
    text-align: center;
    color: #9ca3af;
}

.sort-option.active i {
    color: #FF6B35;
}

.sort-option .check-icon {
    margin-left: auto;
    color: #10b981;
    display: none;
}

.sort-option.active .check-icon {
    display: block;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 * ★★★ [Phase 2] 날짜 필터 드롭다운
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.date-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.85rem;
    color: #4b5563;
}

.date-option:hover {
    background: #fef3c7;
}

.date-option.active {
    background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
    color: #FF6B35;
    font-weight: 600;
}

.date-option i {
    width: 20px;
    text-align: center;
    color: #9ca3af;
}

.date-option.active i {
    color: #FF6B35;
}

.date-option .check-icon {
    margin-left: auto;
    color: #10b981;
    display: none;
}

.date-option.active .check-icon {
    display: block;
}

/* 날짜 범위 커스텀 입력 */
.date-custom-range {
    padding: 12px;
    border-top: 1px solid #fde68a;
    margin-top: 8px;
}

.date-custom-range label {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 4px;
    font-weight: 600;
}

.date-custom-range input[type="date"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #fde68a;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 8px;
    background: white;
    color: #1f2937;
}

.date-custom-range input[type="date"]:focus {
    outline: none;
    border-color: #f59e0b;
}

.date-apply-btn {
    width: 100%;
    padding: 8px 12px;
    background: linear-gradient(135deg, #f59e0b 0%, #FF6B35 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.date-apply-btn:hover {
    opacity: 0.9;
}

/* 필터 초기화 버튼 */
.filter-reset-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    margin-top: 8px;
    border-top: 1px solid #fde68a;
    cursor: pointer;
    font-size: 0.8rem;
    color: #6b7280;
    transition: color 0.2s;
}

.filter-reset-btn:hover {
    color: #ef4444;
}

.filter-reset-btn i {
    font-size: 0.75rem;
}