/* Àü¿ª ÆùÆ® ¼³Á¤ */
/* Inline import moved to layout via preload to avoid render-blocking. Keep font stack and add font-display swap via override. */

html {
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", "¸¼Àº °íµñ", helvetica, "Apple Color Emoji", sans-serif;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin-bottom: 60px;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", "¸¼Àº °íµñ", helvetica, "Apple Color Emoji", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ensure inputs inherit font quickly */
button, input, select, textarea {
  font-family: inherit;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.15rem rgba(107,114,128,0.35);
}

/* Àü¿ª Æ÷Ä¿½º ½ºÅ¸ÀÏ ? Tailwind focus ring ¿À¹ö¶óÀÌµå */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #9ca3af !important; /* gray-400 */
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06) !important;
}

html {
  position: relative;
  min-height: 100%;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Elasticsearch »óÅÂ Ç¥½Ã */
.es-status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    cursor: help;
    transition: all 0.3s ease;
}

.es-status-dot.es-checking {
    background-color: #fbbf24; /* ³ë¶õ»ö - È®ÀÎ Áß */
    animation: es-pulse 1.5s infinite;
}

.es-status-dot.es-connected {
    background-color: #22c55e; /* ÃÊ·Ï»ö - ¿¬°áµÊ */
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

.es-status-dot.es-disconnected {
    background-color: #ef4444; /* »¡°£»ö - ¿¬°á ¾ÈµÊ */
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

@keyframes es-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.9);
    }
}

#es-status {
    position: relative;
}

/* °Ë»ö ÀÚµ¿¿Ï¼º µå·Ó´Ù¿î */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    z-index: 10002;
    overflow: hidden;
}

.autocomplete-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 300px;
    overflow-y: auto;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    transition: background-color 0.15s ease;
}

.autocomplete-item:hover,
.autocomplete-item-active {
    background-color: #f3f4f6;
}

.autocomplete-item-active {
    background-color: #eff6ff;
    color: #2563eb;
}

.autocomplete-item svg {
    flex-shrink: 0;
}

/* ÀÎ±â °Ë»ö¾î ½ºÅ¸ÀÏ */
.popular-terms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.popular-term-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background-color: #f3f4f6;
    border-radius: 16px;
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.15s ease;
}

.popular-term-tag:hover {
    background-color: #e5e7eb;
    color: #1f2937;
}

.popular-term-tag .term-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background-color: #3b82f6;
    color: white;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 600;
    margin-right: 6px;
}

.popular-term-tag.top-3 .term-rank {
    background-color: #ef4444;
}