@charset "utf-8";
/* ========================================
   K-Tell Chat UI - Design System
   UXC_Flarumix CSS vars architecture 기반
======================================== */
@import url('https://fonts.googleapis.com/css2?family=Pretendard:wght@400;500;600;700&display=swap');
@import url('https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css');

/* Reset */
*,
*::before,
*::after {
   box-sizing: border-box;
   margin: 0;
   padding: 0
}

html,
body {
   height: 100%;
   font-family: 'Pretendard', sans-serif;
   font-size: 14px;
   line-height: 1.5;
   -webkit-font-smoothing: antialiased
}

ul,
ol {
   list-style: none
}

a {
   text-decoration: none;
   color: inherit
}

button {
   border: none;
   background: none;
   cursor: pointer;
   font: inherit;
   color: inherit
}

input,
textarea,
select {
   font: inherit;
   border: none;
   outline: none
}

img {
   max-width: 100%;
   display: block
}

/* ========================================
   색상 / 테마 변수는 themes.css 에서 로드됩니다.
   [v9.64] themes.css → ui.css → chat.css 순서로 로드
======================================== */

/* ========================================
   Scrollbar
======================================== */
::-webkit-scrollbar {
   width: 6px;
   height: 6px
}

::-webkit-scrollbar-track {
   background: transparent
}

::-webkit-scrollbar-thumb {
   background: var(--text-tertiary);
   border-radius: 3px
}

::-webkit-scrollbar-thumb:hover {
   background: var(--text-secondary)
}

/* ========================================
   Utility Classes
======================================== */
.text-prime {
   color: var(--color-prime) !important
}

.text-secondary {
   color: var(--text-secondary) !important
}

.text-danger {
   color: var(--danger) !important
}

.bg-prime {
   background: var(--color-prime) !important
}

.ellipsis {
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap
}

/* ========================================
   Buttons
======================================== */
.btn {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   gap: 6px;
   padding: 8px 16px;
   border-radius: var(--radius-sm);
   font-weight: 600;
   font-size: 14px;
   transition: var(--transition);
   cursor: pointer;
   white-space: nowrap
}

.btn:hover {
   opacity: 0.9;
   transform: translateY(-1px)
}

.btn:active {
   transform: translateY(0)
}

.btn-prime {
   background: var(--color-prime);
   color: #fff
}

.btn-outline {
   background: transparent;
   border: 1.5px solid var(--border-color);
   color: var(--text-primary)
}

.btn-outline:hover {
   border-color: var(--color-prime);
   color: var(--color-prime)
}

.btn-danger {
   background: var(--danger);
   color: #fff
}

.btn-sm {
   padding: 5px 10px;
   font-size: 12px
}

.btn-lg {
   padding: 12px 24px;
   font-size: 16px;
   border-radius: var(--radius-md)
}

.btn-block {
   width: 100%
}

.btn-icon {
   width: 36px;
   height: 36px;
   padding: 0;
   border-radius: var(--radius-full)
}

/* ========================================
   Input
======================================== */
.input-wrap {
   position: relative
}

.input-field {
   width: 100%;
   height: 44px;
   padding: 0 14px;
   background: var(--bg-input);
   border: 1.5px solid var(--border-color);
   border-radius: var(--radius-sm);
   color: var(--text-primary);
   font-size: 14px;
   transition: var(--transition)
}

.input-field:focus {
   border-color: var(--color-prime);
   box-shadow: 0 0 0 3px rgba(111, 72, 255, 0.15)
}

.input-field::placeholder {
   color: var(--text-tertiary)
}

.chat-input {
   background: var(--bg-input);
   color: var(--text-primary);
   border: 1px solid var(--border-color);
   border-radius: var(--radius-sm);
   transition: var(--transition);
}

.chat-input:focus {
   border-color: var(--color-prime);
   box-shadow: 0 0 0 3px rgba(111, 72, 255, 0.1);
}

/* ========================================
   Modal
======================================== */
.modal-overlay {
   display: none;
   position: fixed;
   z-index: 100;
   inset: 0;
   background: var(--overlay);
   align-items: center;
   justify-content: center;
   animation: fadeIn .2s
}

.modal-overlay.active {
   display: flex
}

.modal-box {
   background: var(--bg-surface);
   border-radius: var(--radius-lg);
   box-shadow: var(--shadow-lg);
   width: 90%;
   max-width: 420px;
   animation: slideUp .25s ease
}

.modal-header {
   display: flex;
   justify-content: space-between;
   align-items: center;
   padding: 16px 20px;
   border-bottom: 1px solid var(--border-light)
}

.modal-header h3 {
   font-size: 16px;
   font-weight: 700
}

.modal-body {
   padding: 20px
}

.modal-footer {
   display: flex;
   gap: 8px;
   padding: 12px 20px;
   border-top: 1px solid var(--border-light);
   justify-content: flex-end
}

/* ========================================
   Toast
======================================== */
.toast-container {
   position: fixed;
   top: 20px;
   right: 20px;
   z-index: 200;
   display: flex;
   flex-direction: column;
   gap: 8px
}

.toast {
   display: flex;
   align-items: center;
   gap: 10px;
   padding: 12px 18px;
   background: var(--bg-surface);
   border-radius: var(--radius-md);
   box-shadow: var(--shadow-md);
   font-size: 13px;
   animation: slideIn .3s ease;
   border-left: 4px solid var(--color-prime)
}

.toast.error {
   border-left-color: var(--danger)
}

.toast.success {
   border-left-color: var(--success)
}

/* ========================================
   Badge
======================================== */
.badge {
   display: inline-flex;
   align-items: center;
   gap: 3px;
   padding: 2px 8px;
   border-radius: var(--radius-full);
   font-size: 10px;
   font-weight: 700
}

.badge-owner {
   background: #ffd700;
   color: #333
}

.badge-admin {
   background: var(--color-prime);
   color: #fff
}

.badge-member {
   background: var(--bg-input);
   color: var(--text-secondary)
}

.badge-guest {
   background: var(--text-tertiary);
   color: #fff
}

.badge-muted {
   background: var(--danger);
   color: #fff
}

.badge-coowner {
   background: var(--color-prime);
   color: #fff
}

.badge-me {
   background: var(--bg-input);
   color: var(--text-secondary)
}

/* ========================================
   Animations
======================================== */
@keyframes fadeIn {
   from {
      opacity: 0
   }

   to {
      opacity: 1
   }
}

@keyframes slideUp {
   from {
      opacity: 0;
      transform: translateY(20px)
   }

   to {
      opacity: 1;
      transform: translateY(0)
   }
}

@keyframes slideIn {
   from {
      opacity: 0;
      transform: translateX(100px)
   }

   to {
      opacity: 1;
      transform: translateX(0)
   }
}

@keyframes pulse {

   0%,
   100% {
      opacity: 1
   }

   50% {
      opacity: 0.5
   }
}

/* ========================================
   [v10.0] Google Translate Widget Custom UI
======================================== */
/* Kill ALL Google Translate UI elements */
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
iframe.goog-te-banner-frame,
.goog-te-menu-value,
.goog-te-gadget-icon,
#goog-gt-tt,
#goog-gt-,
.goog-tooltip,
.goog-tooltip:hover,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf-ti6hGc,
.VIpgJd-yAWNEb-hvhgNd,
.VIpgJd-yAWNEb-hvhgNd-l4eHX,
.goog-te-balloon-frame {
   display: none !important;
   visibility: hidden !important;
   pointer-events: none !important;
   opacity: 0 !important;
   height: 0 !important;
   width: 0 !important;
   max-height: 0 !important;
   overflow: hidden !important;
}
/* Prevent Google from pushing body down */
body {
   top: 0 !important;
   position: static !important;
}
/* Original Google combo/widget hidden */
#google_translate_element {
   display: none !important;
}
.goog-text-highlight {
   background-color: transparent !important;
   box-shadow: none !important;
}

/* 자체 커스텀 🌐 번역 메뉴 스타일 */
.translate-widget-container {
   position: relative;
   display: flex;
   align-items: center;
}
.btn-trans {
   display: flex;
   align-items: center;
   justify-content: center;
   width: 36px;
   height: 36px;
   border-radius: 50%;
   background: transparent;
   cursor: pointer;
   transition: background 0.2s, transform 0.2s;
   font-size: 20px;
}
.btn-trans:hover {
   background: var(--bg-input, rgba(255,255,255,0.1));
}
.trans-dropdown {
   display: none;
   position: absolute;
   top: 100%;
   right: 0;
   margin-top: 8px;
   background: var(--bg-surface);
   border: 1px solid var(--border-light);
   border-radius: var(--radius-md);
   box-shadow: var(--shadow-lg);
   z-index: 99999 !important; /* 항상 최상단 노출 */
   min-width: 160px;
   max-height: 400px;
   overflow-y: auto;
   flex-direction: column;
   padding: 8px 0;
}
.trans-dropdown.show {
   display: flex;
   animation: slideUp 0.2s ease-out;
}
.trans-item {
   padding: 8px 16px;
   font-size: 13px;
   font-weight: 500;
   color: var(--text-primary);
   cursor: pointer;
   text-align: left;
   background: transparent;
   transition: var(--transition);
}
.trans-item:hover {
   background: var(--bg-input);
   color: var(--color-prime);
}
.trans-item.active {
   font-weight: 700;
   color: var(--color-prime);
}

/* [v10.3] Chat-only Translation ON/OFF Toggle */
.btn-trans {
   position: relative;
}
.trans-badge {
   position: absolute;
   top: 3px;
   right: 3px;
   width: 8px;
   height: 8px;
   border-radius: 50%;
   background: #4caf50;
   border: 1.5px solid var(--bg-header, #fff);
   transition: background 0.2s;
   pointer-events: none;
}
.trans-badge.off {
   background: #9e9e9e;
}
/* Toggle row inside dropdown */
.trans-toggle-row {
   display: flex;
   align-items: center;
   justify-content: space-between;
   padding: 10px 16px 10px;
   border-bottom: 1px solid var(--border-light);
   margin-bottom: 4px;
   cursor: pointer;
   user-select: none;
}
.trans-toggle-row:hover {
   background: var(--bg-input);
}
.trans-toggle-label {
   font-size: 12px;
   font-weight: 700;
   color: var(--text-secondary);
   letter-spacing: 0.04em;
}
.trans-toggle-switch {
   width: 36px;
   height: 20px;
   border-radius: 10px;
   background: #9e9e9e;
   position: relative;
   transition: background 0.25s;
   flex-shrink: 0;
}
.trans-toggle-switch::after {
   content: '';
   position: absolute;
   top: 3px;
   left: 3px;
   width: 14px;
   height: 14px;
   border-radius: 50%;
   background: #fff;
   transition: left 0.25s;
   box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.trans-toggle-switch.on {
   background: #4caf50;
}
.trans-toggle-switch.on::after {
   left: 19px;
}
