@charset "utf-8";

/* ==========================================================================
   Top Navbar Component Styles
   (Ported from demo/assets/css/finto.css for frontend consistency)
   ========================================================================== */

/* Fade In Animation (for Auth UI) */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Top Navbar - 글래스모피즘 스타일 */
.top-navbar{
  position:fixed;
  top:0;
  left:0;
  right:0;
  height:70px;
  background:rgba(255,255,255,0.85);
  border-bottom:1px solid rgba(0,0,0,0.06);
  z-index:100;
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  box-shadow:0 2px 12px rgba(0,0,0,0.03);
}
.top-navbar__container{
  max-width:1400px;
  margin:0 auto;
  height:100%;
  padding:0 32px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:40px;
}
.top-navbar__logo{
  text-decoration:none;
  display:flex;
  align-items:center;
  flex-shrink:0;
}
.top-navbar__logo-text{
  font-size:26px;
  font-weight:800;
  background:linear-gradient(to right, var(--brandGreen), var(--brandBlue));
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
  letter-spacing:1.5px;
}
.top-navbar__nav{
  display:flex;
  align-items:center;
  gap:4px;
  flex:1;
}
.top-navbar__nav-link{
  text-decoration:none;
  color:#5f6368;
  font-size:15px;
  font-weight:500;
  padding:10px 18px;
  border-radius:10px;
  transition:all 0.2s ease;
  display:flex;
  align-items:center;
  gap:6px;
}
.top-navbar__nav-link i{
  font-size:14px;
  opacity:0.7;
}
.top-navbar__nav-link:hover{
  color:#202124;
  background:rgba(0,0,0,0.04);
}
.top-navbar__markets{
  display:flex;
  align-items:center;
  gap:16px;
  margin-left:auto;
  margin-right:20px;
  flex-shrink:0;
}
.market-item{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:13px;
}
.market-item__label{
  font-weight:600;
  color:#5f6368;
}
.market-item__value{
  font-weight:700;
  color:#202124;
}
.market-item__change{
  font-size:12px;
  font-weight:600;
}
.market-item__change--up{
  color:#d32f2f;
}
.market-item__change--down{
  color:#1976d2;
}

/* 글로벌 검색바 (기본 레이아웃) */
.top-navbar__search{
  position:relative;
  flex:1;
  max-width:500px;
  margin:0 20px;
}

/* 우측 액션 */
.top-navbar__actions{
  display:flex;
  align-items:center;
  gap:12px;
  flex-shrink:0;
  margin-left:auto;
}
.top-navbar__icon-btn{
  position:relative;
  width:40px;
  height:40px;
  border:none;
  background:transparent;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#5f6368;
  cursor:pointer;
  transition:all 0.2s;
}
.top-navbar__icon-btn:hover{
  background:rgba(0,0,0,0.05);
  color:#202124;
}
.top-navbar__icon-btn.active{
  color:#fbbf24;
}
.top-navbar__icon-btn.active:hover{
  color:#f59e0b;
  background:rgba(251,191,36,0.1);
}
.top-navbar__icon-btn .badge{
  position:absolute;
  top:6px;
  right:6px;
  width:18px;
  height:18px;
  background:#d32f2f;
  color:#fff;
  font-size:10px;
  font-weight:700;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* 프로필 드롭다운 */
.top-navbar__profile{
  position:relative;
}
.top-navbar__profile-btn{
  display:flex;
  align-items:center;
  gap:8px;
  padding:6px 12px 6px 6px;
  border:none;
  background:transparent;
  border-radius:24px;
  cursor:pointer;
  transition:all 0.2s;
}
.top-navbar__profile-btn:hover{
  background:rgba(0,0,0,0.05);
}
.top-navbar__avatar{
  width:32px;
  height:32px;
  border-radius:50%;
  object-fit:cover;
}
.top-navbar__username{
  font-size:14px;
  font-weight:500;
  color:#202124;
}
.top-navbar__profile-btn i{
  font-size:12px;
  color:#5f6368;
  transition:transform 0.2s;
}
.top-navbar__profile.active .top-navbar__profile-btn i{
  transform:rotate(180deg);
}
.top-navbar__dropdown{
  position:absolute;
  top:calc(100% + 8px);
  right:0;
  width:220px;
  background:#fff;
  border-radius:12px;
  box-shadow:0 4px 20px rgba(0,0,0,0.15);
  padding:8px 0;
  display:none;
  z-index:100;
}
.top-navbar__dropdown.show{
  display:block;
  animation:dropdownFadeIn 0.2s ease;
}
@keyframes dropdownFadeIn{
  from{
    opacity:0;
    transform:translateY(-10px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}
.top-navbar__dropdown-item{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 16px;
  color:#202124;
  text-decoration:none;
  transition:background 0.2s;
}
.top-navbar__dropdown-item:hover{
  background:rgba(0,0,0,0.05);
}
.top-navbar__dropdown-item i{
  width:20px;
  color:#5f6368;
  font-size:14px;
}
.top-navbar__dropdown-item span{
  font-size:14px;
}
.top-navbar__dropdown-divider{
  height:1px;
  background:#e5e7eb;
  margin:8px 0;
}
.top-navbar__link{
  text-decoration:none;
  color:#5f6368;
  font-size:15px;
  font-weight:500;
  padding:10px 18px;
  border-radius:10px;
  transition:all 0.2s ease;
}
.top-navbar__link:hover{
  color:#202124;
  background:rgba(0,0,0,0.04);
}
.top-navbar__btn{
  text-decoration:none;
  color:#fff;
  background:linear-gradient(135deg, var(--brandGreen), var(--brandBlue));
  font-size:15px;
  font-weight:600;
  padding:11px 24px;
  border-radius:10px;
  transition:all 0.2s ease;
  box-shadow:0 2px 8px rgba(27,116,55,0.2);
}
.top-navbar__btn:hover{
  transform:translateY(-1px);
  box-shadow:0 4px 12px rgba(27,116,55,0.3);
}

/* 반응형 스타일 */
@media (max-width: 968px) {
  .top-navbar__nav{
    display:none;
  }
}
@media (max-width: 768px) {
  .top-navbar__search{
    max-width:300px;
    margin:0 12px;
  }
  .top-navbar__username{
    display:none;
  }
}
@media (max-width: 640px) {
  .top-navbar{
    height:60px;
  }
  .top-navbar__container{
    padding:0 16px;
    gap:8px;
  }
  .top-navbar__logo-text{
    font-size:20px;
  }
  .top-navbar__search{
    display:none;
  }
  .top-navbar__markets{
    display:none;
  }
  .top-navbar__link{
    padding:8px 12px;
    font-size:13px;
  }
  .top-navbar__btn{
    padding:9px 16px;
    font-size:13px;
  }
  .top-navbar__username{
    display:none;
  }
  .top-navbar__profile-btn{
    padding:4px 8px 4px 4px;
  }
  .top-navbar__avatar{
    width:32px;
    height:32px;
    font-size:12px;
  }
  .top-navbar__dropdown{
    right:0;
    width:200px;
  }
}

/* ========================================
   Topnav 내부 검색창 상세 스타일 (앱 페이지용)
   ======================================== */
.top-navbar__search .searchbar {
  position: relative;
  width: 100%;
}

.top-navbar__search .searchbar__wrapper {
  position: relative;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  background: #fff !important;
  border: 1px solid #dfe1e5;
  border-radius: 56px;
  padding: 8px 60px 8px 50px;
  min-height: 48px;
  box-shadow: 0 2px 8px rgba(32, 33, 36, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 8px;
}

.top-navbar__search .searchbar__wrapper:hover {
  box-shadow: 0 3px 14px rgba(32, 33, 36, 0.16);
  border-color: #c6c9cc;
  transform: translateY(-1px);
}

.top-navbar__search .searchbar__wrapper:focus-within {
  box-shadow: 0 6px 24px rgba(30, 58, 138, 0.25);
  border-color: #1E3A8A;
  transform: translateY(-2px);
}

.top-navbar__search .searchbar__icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa0a6;
  font-size: 18px;
  pointer-events: none;
}

.top-navbar__search .searchbar__input {
  flex: 1;
  min-width: 180px;
  border: none !important;
  border-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  outline: none !important;
  background: transparent !important;
  background-color: transparent !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  -moz-box-shadow: none !important;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #202124;
  height: auto !important;
  width: 100% !important;
  line-height: 1.5 !important;
  vertical-align: middle !important;
  display: inline-block !important;
  text-align: left !important;
  caret-color: #1E3A8A !important;
}

.top-navbar__search .searchbar__input::placeholder {
  background: transparent !important;
  color: #9aa0a6;
  font-size: 15px;
}

.top-navbar__search .searchbar__input:focus::placeholder {
  opacity: 0 !important;
  color: transparent !important;
}

.top-navbar__search .searchbar__btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #1b7437, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  padding: 0;
  margin: 0;
}

.top-navbar__search .searchbar__btn:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  background: linear-gradient(135deg, #1e8a3f, #3b82f6);
}

.top-navbar__search .searchbar__btn:active {
  opacity: 0.9;
  transform: translateY(-50%) scale(0.98);
}

.top-navbar__search .searchbar__btn i {
  font-size: 16px;
  color: #ffffff;
  line-height: 1;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
  transition: filter 0.2s ease;
}

.top-navbar__search .searchbar__btn:hover i {
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

.top-navbar__search .tags-in-search {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-right: 8px;
}

/* Topnav 자동완성 목록 */
.top-navbar__search .searchbar.ac-wrap {
  position: relative;
}

#topnav-ac-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: #fff !important;
  border: 1px solid #dfe1e5;
  border-radius: 24px;
  box-shadow: 0 4px 16px rgba(32, 33, 36, 0.15);
  z-index: 100;
  max-height: 400px;
  overflow: auto;
  display: none;
  margin-top: 4px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#topnav-ac-list[style*="display: block"] {
  animation: slideDownFade 0.3s ease forwards;
}

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

/* 자동완성 아이템 스타일 */
.ac-item {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background 0.15s ease;
  border-bottom: 1px solid #f3f4f6;
}

.ac-item:last-child {
  border-bottom: none;
}

.ac-item:hover,
.ac-item.active {
  background: #f9fafb;
}

.ac-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ac-name {
  font-weight: 600;
  font-size: 14px;
  color: #1f2937;
}

.ac-code {
  font-size: 12px;
  color: #6b7280;
  font-family: monospace;
}
