/* 카테고리 탭 네비게이션 스타일 */
.category-tabs {
    background: white;
    border-bottom: 2px solid #e5e7eb;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: var(--body-padding-top); /* CSS 변수: 전광판+헤더 높이 (배너 표시 시 JS가 조절) */
    z-index: 900;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.category-tabs-left {
    display: flex;
    gap: 8px;
}

.category-tabs-right {
    display: flex;
    align-items: center;
}

.tab-button {
    background: transparent;
    border: none;
    padding: 16px 24px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.tab-button:hover {
    color: #1f2937;
    background: #f9fafb;
}

.tab-button.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.tab-button i {
    font-size: 16px;
}

/* 시세 업데이트 버튼 */
.manual-refresh-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.manual-refresh-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.manual-refresh-btn:active {
    transform: translateY(0);
}

.manual-refresh-btn i {
    font-size: 14px;
    transition: transform 0.5s ease;
}

.manual-refresh-btn.refreshing i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.manual-refresh-btn .refresh-text {
    white-space: nowrap;
}

.manual-refresh-btn .refresh-hint {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.85;
    white-space: nowrap;
}

.manual-refresh-btn .refresh-time {
    margin-left: 8px;
    padding-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 12px;
    font-weight: 600;
    opacity: 0.95;
    white-space: nowrap;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .category-tabs {
        /* top은 CSS 변수가 자동 반영 */
        padding: 0 12px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .category-tabs-left {
        gap: 4px;
    }

    .tab-button {
        padding: 12px 16px;
        font-size: 14px;
        flex-direction: column;
        gap: 4px;
    }

    .tab-button span {
        font-size: 11px;
    }

    .tab-button i {
        font-size: 18px;
    }

    .manual-refresh-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .manual-refresh-btn .refresh-hint {
        display: none;
    }

    .manual-refresh-btn .refresh-time {
        font-size: 10px;
        margin-left: 4px;
        padding-left: 4px;
    }
}

@media (max-width: 480px) {
    .category-tabs {
        padding: 0 8px;
    }

    .tab-button span {
        display: none; /* 아이콘만 표시 */
    }

    .tab-button {
        padding: 12px;
    }

    .manual-refresh-btn {
        padding: 8px 10px;
    }

    .manual-refresh-btn .refresh-text {
        display: none;
    }

    .manual-refresh-btn i {
        font-size: 16px;
    }

    .manual-refresh-btn .refresh-time {
        display: block;
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        font-size: 9px;
    }
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   시세 업데이트 버튼 커스텀 툴팁
   ============================================ */
button.manual-refresh-btn {
    position: relative !important;
}

/* 툴팁 화살표 (아래쪽) */
button.manual-refresh-btn::before {
    content: "" !important;
    position: absolute !important;
    bottom: calc(100% + 10px) !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(6px) !important;
    border: 6px solid transparent !important;
    border-top-color: rgba(0, 0, 0, 0.9) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.2s ease, transform 0.2s ease !important;
    z-index: 10001 !important;
}

/* 툴팁 내용 */
button.manual-refresh-btn::after {
    content: "실시간 시세 멤버십 제공" !important;
    position: absolute !important;
    bottom: calc(100% + 10px) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: rgba(0, 0, 0, 0.9) !important;
    color: white !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.2s ease, transform 0.2s ease !important;
    z-index: 10001 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

/* 호버 시 툴팁 표시 */
button.manual-refresh-btn:hover::before,
button.manual-refresh-btn:hover::after {
    opacity: 1 !important;
    transform: translateX(-50%) translateY(0) !important;
}

/* 모바일에서 툴팁 숨김 */
@media (max-width: 768px) {
    button.manual-refresh-btn::before,
    button.manual-refresh-btn::after {
        display: none !important;
    }
}

/* ========================================
   reCAPTCHA 배지 숨김 (Google 정책 준수)
   ======================================== */
/* 
   reCAPTCHA v3 배지를 숨김
   대신 개인정보처리방침에 다음 내용 명시 필요:
   
   "본 사이트는 Google reCAPTCHA v3를 사용하여 봇 활동을 방지합니다.
    이는 Google 개인정보처리방침(https://policies.google.com/privacy)과
    이용약관(https://policies.google.com/terms)이 적용됩니다."
*/
.grecaptcha-badge {
    visibility: hidden !important;
}
