/* http://meyerweb.com/eric/tools/css/reset/
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd,
fieldset, form, label, legend,
caption,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    vertical-align: baseline;
    line-height: 1.25;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
    display: block;
}

:root {
    scroll-behavior: auto;
}

body {
    line-height: 1.25;
}

code {
    white-space: normal;
}

input:focus {
    outline: none !important;
    box-shadow: none !important;
}

ol, ul {
    margin-bottom: 0;
}

/* Animations for redesigned board page */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

@keyframes dataProcessing {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    }
}

@keyframes dataEntry {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-8px) scale(1.1);
        opacity: 1;
    }
}

@keyframes dataFlow {
    0%, 100% {
        transform: translateX(0);
        opacity: 0.5;
    }
    50% {
        transform: translateX(5px);
        opacity: 1;
    }
}

@keyframes chartGeneration {
    0%, 100% {
        transform: translateX(-50%) translateY(0) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translateX(-50%) translateY(-10px) scale(1.2);
        opacity: 1;
    }
}


@keyframes diamondProcessing {
    0% {
        transform: rotate(45deg) scale(1);
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    }
    50% {
        transform: rotate(45deg) scale(1.03);
        box-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    }
    100% {
        transform: rotate(45deg) scale(1);
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

.animate-bounce {
    animation: bounce 2s infinite;
}

/* Feature card hover effects */
.feature-card:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .display-3 {
        font-size: 2rem !important;
    }

    .display-4 {
        font-size: 1.5rem !important;
    }
}

blockquote, q {
    quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

html {
    font-family: "Pretendard" !important;
}

html, body {
    overflow-x: hidden;
    height: 100%;
}

a {
    color: initial;
    text-decoration: none;
    cursor: pointer;
}

a:hover {
    color: initial;
}

.text-blue {
    color: #0d6efd;
}

.markepers-message-style {
    white-space: pre-wrap;
    line-height: 1.5;
}

.markepers-message * {
    line-height: 1.5;
}

.markepers-message ol, .markepers-message ul, .markepers-message li {
    line-height: 1;
}

.markepers-message li {
    line-height: 1.25;
}

/* 메시지 토글 버튼 스타일 */
#btn-message-toggle, #btn-quick-hint-toggle {
    top: 30px;
    right: 0;
    z-index: 1000;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #8C8C8C;
    margin-left: auto;
    margin-right: 20px;
}

/* 메시지 확대/축소 트랜지션 */
.markepers-message {
    position: relative;
    cursor: pointer;
}

.markepers-message:not(.message-expanded) {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.markepers-message.message-expanded {
    max-height: none !important;
    overflow: visible !important;
    cursor: default;
}

.markepers-message.message-expanded:after {
    display: none;
}

.main-container {
    --bs-gutter-x: 2rem;
    max-width: 1800px !important;
    left: 0;
    width: 100%;
    margin: auto;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.sub-container {
    max-width: 768px !important;
    left: 0;
    width: 100%;
    margin: auto;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}


.overflow-scroll {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.blurred {
    pointer-events: none; /* 클릭 방지 */

    /* 그라데이션 마스크 추가 */
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0) 90%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0) 90%);

    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

.width-max-content {
    width: max-content;
    min-width: 100%;
}

.request-message-height {
    min-height: calc(100vh - 150px);
}

.thumbnail-wrapper {
    position: relative;
    display: inline-block;
    margin: 5px;
    line-height: 1;
}

.thumbnail-wrapper img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 1rem;
}

.thumbnail-wrapper .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    color: white;
    background: var(--bs-secondary);
    border-radius: 50%;
    padding: 2px;
    cursor: pointer;
    font-size: 14px;
    width: 18px;
    height: 18px;
    display: flex;
    align-content: center;
    justify-content: center;
}

.ellipsis-one-line {
    white-space: nowrap; /* 줄 바꿈 없이 한 줄로 유지 */
    overflow: hidden; /* 넘친 텍스트 숨김 */
    text-overflow: ellipsis; /* 넘친 부분에 ... 표시 */
}

.ellipsis-two-lines {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 최대 줄 수 설정 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-all;
}

/* Hero title font size adjustment */
.hero-section .display-1 {
    word-break: keep-all;
    font-size: min(4rem, calc(1.25rem + 4.5vw)) !important;
}

#btn-sidebar-toggle {
    position: absolute;
    left: 50%;
    top: initial;
    bottom: 8px;
    transform: translateX(-50%);
    z-index: 990;
}

#btn-main-content-toggle {
    position: absolute;
    left: 50%;
    top: 8px;
    transform: translateX(-50%);
    z-index: 990;
}

#main-content {
    width: min-content;
    background: #fff;
    z-index: 99;
}

#sidebar, #main-content {
    max-width: 100%;
    min-width: 100%;
    height: 320px;
    visibility: hidden;
}

#sidebar:not(.expand), #main-content:not(.expand) {
    height: 0 !important;
}

#sidebar.expand {
    width: 100%;
    max-width: 100%;
}

#sidebar.expand.expand2 {
    max-height: 100%;
    height: 100vh;
}

#btn-sidebar-toggle.expand2 {
    position: fixed !important;
}

#main-content.expand {
    flex-grow: 1;
}

#sidebar.expand, #main-content.expand {
    visibility: visible;
}

#sidebar.expand2, #main-content.expand2 {
    width: 100% !important;
    height: 100% !important;
}

#sidebar.expand2 #tab-content-messages {
    width: 100%;
    height: calc(100vh - 115px);
}

#main-content-container {
    word-break: break-word;
    height: 100%;
}

#sidebar .nav-link {
    color: var(--bs-nav-tabs-link-active-color);
}

#sidebar .nav-link.active {
    color: var(--bs-nav-link-color);
}

.content-splitter {
    position: relative;
    height: 1px;
    width: 100%;
    background-color: #ced4da;
    flex-shrink: 0;
    z-index: 100;
}

.content-splitter::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 0;
    width: 100%;
    height: 11px;
    cursor: row-resize;
    pointer-events: all;
}

.content-splitter.active {
    background-color: var(--bs-primary);
}


#textarea-ai-action:focus {
    color: initial;
    background-color: white;
    outline: initial;
    box-shadow: initial;
}

#btn-attach-images-a:focus, #btn-attach-images-b:focus {
    color: initial;
    outline: initial;
    box-shadow: initial;
}

#input-message {
    resize: none;
}

.toast-container {
    z-index: 9999 !important;
}

.persona-profile-img {
    animation: fade-in-out 3s linear infinite;
}

.pulse-animation {
    animation: pulse 1.5s infinite ease-in-out;
}

.ai-loading-message {
    color: #6c757d;
    font-style: italic;
    opacity: 0.8;
    position: relative;
}

.ai-loading-message::after {
    content: '';
    display: inline;
    animation: typing-dots 1.5s infinite;
}

@keyframes typing-dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60% {
        content: '...';
    }
    80%, 100% {
        content: '....';
    }
}


.lds-spinner {
    color: var(--bs-primary) !important;
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}

.lds-spinner div {
    transform-origin: 40px 40px;
    animation: lds-spinner 1.2s linear infinite;
}

.lds-spinner div:after {
    content: " ";
    display: block;
    position: absolute;
    top: 3px;
    left: 37px;
    width: 6px;
    height: 18px;
    border-radius: 20%;
    background: var(--bs-primary) !important;
}

.lds-spinner div:nth-child(1) {
    transform: rotate(0deg);
    animation-delay: -1.1s;
}

.lds-spinner div:nth-child(2) {
    transform: rotate(30deg);
    animation-delay: -1s;
}

.lds-spinner div:nth-child(3) {
    transform: rotate(60deg);
    animation-delay: -0.9s;
}

.lds-spinner div:nth-child(4) {
    transform: rotate(90deg);
    animation-delay: -0.8s;
}

.lds-spinner div:nth-child(5) {
    transform: rotate(120deg);
    animation-delay: -0.7s;
}

.lds-spinner div:nth-child(6) {
    transform: rotate(150deg);
    animation-delay: -0.6s;
}

.lds-spinner div:nth-child(7) {
    transform: rotate(180deg);
    animation-delay: -0.5s;
}

.lds-spinner div:nth-child(8) {
    transform: rotate(210deg);
    animation-delay: -0.4s;
}

.lds-spinner div:nth-child(9) {
    transform: rotate(240deg);
    animation-delay: -0.3s;
}

.lds-spinner div:nth-child(10) {
    transform: rotate(270deg);
    animation-delay: -0.2s;
}

.lds-spinner div:nth-child(11) {
    transform: rotate(300deg);
    animation-delay: -0.1s;
}

.lds-spinner div:nth-child(12) {
    transform: rotate(330deg);
    animation-delay: 0s;
}

@keyframes lds-spinner {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes fade-in-out {
    0% {
        opacity: 0.4;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.4;
    }
}

@keyframes pulseOld {
    0% {
        transform: scale(0.9);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(0.9);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes drawLine {
    0% {
        stroke-dasharray: 0 1000;
        opacity: 0.5;
    }
    50% {
        stroke-dasharray: 1000 0;
        opacity: 1;
    }
    100% {
        stroke-dasharray: 0 1000;
        opacity: 0.5;
    }
}

@keyframes fillArea {
    0%, 100% {
        opacity: 0.2;
        transform: scaleY(1);
    }
    50% {
        opacity: 0.4;
        transform: scaleY(1.05);
    }
}

/* Typewriter Animation for AI Insights */
@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: var(--text-width, 100%);
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: white;
    }
}

.ai-insight-text {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid white;
    width: 0;
    display: inline-block;
}

.ai-insight-text.typing {
    animation: typewriter 0.5s steps(25, end), blink-caret 0.3s step-end infinite;
    animation-fill-mode: forwards;
}

.ai-insight-text.typing-complete {
    border-right: none;
    white-space: normal;
    width: auto;
    display: inline-block;
}

.ai-insight-text.typing-complete::after {
    content: "";
    display: block;
    width: 0;
    height: 0;
}

.ai-insight-subtitle {
    opacity: 0;
    transition: opacity 0.5s ease-in;
    display: block;
    clear: both;
}

.ai-insight-subtitle.show {
    opacity: 0.75;
}

/* AI Insights 동그라미 고정 크기 유지 */
.ai-insight-text ~ .bg-white.rounded-circle,
.d-flex .bg-white.rounded-circle {
    flex-shrink: 0;
    min-width: 8px;
    min-height: 8px;
}


/* Guide Chatbot Highlight Effect */
@keyframes guideHighlight {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.6), 0 0 20px rgba(255, 107, 107, 0.4);
        background-color: rgba(255, 107, 107, 0.08);
    }
    50% {
        box-shadow: 0 0 0 5px rgba(255, 71, 87, 0.8), 0 0 30px rgba(255, 71, 87, 0.6);
        background-color: rgba(255, 71, 87, 0.12);
    }
}

.guide-highlight {
    animation: guideHighlight 1s ease-in-out 3;
    position: relative;
    z-index: 1000;
}


@media (min-width: 992px) {
    .btn-lg-lg {
        padding: 0.5rem 1rem;
        font-size: 1.25rem;
        border-radius: 0.375rem;
    }

    .content-splitter {
        width: 1px;
        height: 100%;
        cursor: col-resize;
        touch-action: none;
    }

    .content-splitter::before {
        content: '';
        position: absolute;
        left: -5px;
        top: 0;
        width: 11px;
        height: 100%;
        cursor: col-resize;
        pointer-events: all;
    }

    #sidebar, #main-content {
        max-width: initial;
        min-width: initial;
        height: calc(100vh - 56.516px);
    }

    #btn-sidebar-toggle.expand2 {
        position: absolute !important;
    }

    #sidebar:not(.expand), #main-content:not(.expand) {
        width: 0 !important;
        height: calc(100vh - 56.516px) !important;
    }

    #sidebar.expand {
        width: calc(100% - 400px);
        max-width: calc(100% - 360px);
        max-height: 100%;
    }

    #sidebar.expand.expand2 {
        max-width: 100%;
    }

    #sidebar.expand2, #main-content.expand2 {
        height: calc(100vh - 56.516px) !important;
    }

    #sidebar.expand, #main-content.expand {
        min-width: 360px;
        height: calc(100vh - 56.516px);
    }

    #btn-sidebar-toggle {
        top: 12px;
        left: -40px;
        bottom: initial;
        transform: none;
    }

    #btn-main-content-toggle {
        position: absolute;
        top: 12px;
        left: 8px;
        bottom: initial;
        transform: none;
    }

    #btn-message-toggle, #btn-quick-hint-toggle {
        top: 20px
    }
}

/* Guide Chatbot Message Styling */
.guide-message-content p,
.guide-message-content ol,
.guide-message-content ul,
.guide-message-content li,
.guide-message-content span {
    line-height: 1.75;
}

/* Floating Menu Hover Effect */
.hover-bg-light {
    transition: background-color 0.2s ease;
}

.hover-bg-light:hover {
    background-color: #f8f9fa !important;
}

/* Symbol Loading Overlay */
.symbol-loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.symbol-loading-overlay.active {
    display: flex;
}

.symbol-loading-container {
    position: relative;
    width: 100px;
    height: 100px;
}

.symbol-loading-icon {
    width: 100%;
    height: 100%;
    display: block;
    position: relative;
}

.symbol-loading-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.9) 0%,
            rgba(255, 255, 255, 0.9) 20%,
            #7337FF 40%,
            #7337FF 60%,
            rgba(255, 255, 255, 0.9) 80%,
            rgba(255, 255, 255, 0.9) 100%
    );
    background-size: 100% 200%;
    background-position: 0% -100%;
    mask-image: url('/static/img/symbol-white.svg');
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url('/static/img/symbol-white.svg');
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    animation: symbolGradientWave 2.5s linear infinite;
    pointer-events: none;
}

@keyframes symbolGradientWave {
    0% {
        background-position: 0% 100%;
    }
    100% {
        background-position: 0% -100%;
    }
}

/* Guide Chatbot Button Responsive Positioning */
#btn-guide-chatbot {
    width: 48px;
    height: 48px;
    border-radius: 50% !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 992px) {
    #guide-chatbot-container {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%);
    }

    #btn-guide-chatbot {
        width: auto;
        height: auto;
        border-radius: 50px !important;
        padding: 12px 24px !important;
    }
}
