@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)
}

/* ========================================
   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
   }
}