/* NJ-90973: AI Support Chat — native CSS only */

.ai-support-wrapper {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 100px);
    position: relative;
    background: #fff;
    min-height: 0;
}
#dify-ai-support-app {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}
.dify-chat {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}
.ai-support-messages {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}
.ai-support-messages::-webkit-scrollbar { width: 8px; }
.ai-support-messages::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
.ai-support-messages::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; }
.ai-support-messages::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }
.ai-support-messages-inner {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 16px 24px 0;
}
.ai-support-notice-pc {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
    padding: 8px;
    flex-wrap: wrap;
    text-align: center;
}
.ai-support-notice-text { font-size: 12px; color: #5F686F; }
.ai-support-notice-link { font-size: 12px; color: #00ACEE; text-decoration: underline; }
.ai-support-notice-sp {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 2px;
    padding: 16px;
    flex-wrap: wrap;
    text-align: center;
    background: #F0F0F0;
}
.ai-support-notice-text-sm { font-size: 10px; color: #5F686F; }
.ai-support-notice-link-sm { font-size: 10px; color: #00ACEE; text-decoration: underline; }
.ai-support-message-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 16px;
    padding-bottom: 24px;
}
.ai-support-ai-block {
    display: flex;
    flex-direction: column;
}
.ai-support-avatar {
    padding: 4px;
    width: 48px;
    height: 48px;
    background: #092846;
    border-radius: 50%;
    overflow: hidden;
    border: 0.6px solid #ccc;
}
.ai-support-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ai-support-ai-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px 24px;
}
.ai-support-chat-text {
    font-size: 15px;
    color: #333;
    max-width: 614px;
    line-height: 1.7;
}
.ai-support-chat-text .ai-support-bold {
    font-weight: bold;
}
.ai-support-beta-text {
    font-size: 13px;
    color: #555;
}
.ai-support-user-msg {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: 100%;
}
.ai-support-user-bubble {
    display: flex;
    align-items: center;
    background: #FFF5E9;
    border-radius: 16px;
    padding: 20px;
    word-break: break-word;
}
.ai-support-action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}
.ai-support-btn {
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 5px 0 rgba(0,0,0,0.10);
    transition: all 0.2s ease;
}
.ai-support-btn-active {
    background: #fff;
    border: 1px solid #F1890E;
    color: #F1890E;
}
.ai-support-btn-active:hover {
    background: #FFF5E9;
}
.ai-support-btn-disabled {
    background: #DDD;
    border: none;
    color: #888;
    cursor: not-allowed;
}
.ai-support-footer {
    flex-shrink: 0;
    background: #fff;
}
.ai-support-input-wrapper {
    width: 848px;
    max-width: 100%;
    margin: 0 auto;
    padding: 14px 0;
    box-sizing: border-box;
}
.ai-support-input-container {
    position: relative;
    width: 100%;
}
.ai-support-input {
    width: 848px;
    max-width: 100%;
    height: 56px;
    font-size: 16px;
    color: #000;
    padding: 16px 70px 16px 24px;
    border-radius: 9999px;
    border: none;
    outline: none;
    box-shadow: 0 2px 6px 0 rgba(244,127,35,0.4);
    line-height: 24px;
    resize: none;
    box-sizing: border-box;
    overflow: hidden;
    min-height: 0px;
    background:#fff;
}
.ai-support-input::placeholder {
    color: #999;
}
.ai-support-send-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.ai-support-send-btn img {
    width: 40px;
    height: 40px;
}
.typing-indicator-bubble {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    width: 80px;
    height: 48px;
    background: #FAFAFA;
    border-radius: 0 20px 20px 20px;
    box-shadow: 0 3px 10px 0 rgba(244,163,35,0.30);
}
.typing-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}
.typing-dot {
    width: 10px;
    height: 10px;
    background: #F1890E;
    border-radius: 50%;
    animation: ai_bounce 1.4s infinite ease-in-out;
}
.typing-dot-1 { animation-delay: 0ms; }
.typing-dot-2 { animation-delay: 200ms; }
.typing-dot-3 { animation-delay: 400ms; }
@keyframes ai_bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
}
.ai-message-content,
.user-message-content {
    font-size: 15px;
    line-height: 1.7;
    color: #1a1a1a;
    letter-spacing: 0.01em;
}
.ai-message-content p { margin-bottom: 4px; }
.ai-message-content p:last-child { margin-bottom: 0; }
.ai-message-content br.ai-paragraph-break { display: block; content: ''; margin-top: 8px; }
.ai-message-content br { display: block; content: ''; margin-top: 2px; }
.ai-message-content a { color: #00ACEE; text-decoration: underline; }
.ai-message-content a:hover { color: #0088cc; }
.ai-message-content strong { font-weight: 700; color: #111; }
.user-message-content { color: #333; }
.ai-message-content h1, .ai-message-content .ai-h1 { font-size: 15px; font-weight: 700; color: #092846; margin: 6px 0 3px; }
.ai-message-content h2, .ai-message-content .ai-h2 { font-size: 13px; font-weight: 700; color: #092846; margin: 5px 0 2px; }
.ai-message-content h3, .ai-message-content .ai-h3 { font-size: 12px; font-weight: 700; color: #092846; margin: 4px 0 2px; }
.ai-message-content ul, .ai-message-content ol { margin: 4px 0; padding-left: 15px; }
.ai-message-content ul li, .ai-message-content ol li { margin-bottom: 2px; line-height: 1.5; }
.ai-message-content ul { list-style-type: disc; }
.ai-message-content ul li::marker { color: #F1890E; font-weight: bold; }
.ai-message-content ol { list-style-type: decimal; }
.ai-message-content ol li::marker { color: #F1890E; font-weight: 700; }
.ai-message-content hr { border: none; border-top: 1px solid #ddd; margin: 6px 0; }

@media (max-width: 768px) {
    .ai-support-notice-pc { display: none; }
    .ai-support-notice-sp { display: flex; }
    .ai-support-wrapper { height: calc(100vh - 60px); }
    .ai-support-messages-inner { padding: 16px 16px 0; }
    .ai-support-input-wrapper { padding: 10px 16px; width: auto; }
    .ai-support-input { width: 100%; }
}
@media (min-width: 769px) {
    .ai-support-notice-pc { display: flex; }
    .ai-support-notice-sp { display: none; }
}

.ai-support-floating-btn{
    position:fixed;
    right:3.2rem;
    bottom:3.2rem;
    z-index:9998;
    width:7.2rem;
    height:7.2rem;
    box-sizing:border-box;
    border-radius:100%;
    border:0.25rem solid #F1890E;
    background:linear-gradient(135deg,rgba(255,178,0,0.40) 5.72%,rgba(255,255,255,0.40) 50%,rgba(255,106,0,0.40) 94.28%),#FFF;
    box-shadow:0 0.3rem 0.3rem 0 rgba(0,0,0,0.25);
    display:flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    transition:transform 0.2s ease,box-shadow 0.2s ease;
    cursor:pointer;
}
.ai-support-floating-btn:hover{transform:translateY(-0.2rem);
    box-shadow:0 0.6rem 2rem rgba(0,0,0,0.16);
}
.ai-support-floating-btn img{width:6.7rem;
    height:6.7rem;
    border-radius:50%;
    object-fit:cover;
}
.ai-support-floating-btn a::after{content:'';
    position:absolute;
    top:-58px;
    bottom:64px;
    left:-20px;
    right:-20px;
    z-index:1;
}
.ai-support-text{
    position:absolute;
    font-family: "Noto Sans", sans-serif;
    bottom:7rem;
    left:50%;
    box-sizing:border-box;
    transform:translateX(-50%);
    background:#fff;
    border-radius:1rem;
    font-size:13px;
    justify-content:center;
    font-weight:700;
    line-height:1.3;
    color:#F1890E;
    white-space:nowrap;
    border:0.2rem solid #F1890E;
    box-shadow:0 0.2rem 0.8rem rgba(0,0,0,0.1);
    text-align:center;
    display:flex;
    width:11.6rem;
    padding:0.7rem 0.8rem;
    flex-direction:column;
    align-items:center;
    gap:0.1rem;
}
.ai-support-text::after{
    content:'';
    position:absolute;
    top:100%;
    left:50%;
    transform:translateX(-50%);
    width:0;
    height:0;
    border-top:0.9rem solid #F1890E;
    border-left:0.9rem solid transparent;
    border-right:0.9rem solid transparent;
}
.ai-support-text::before{
    content:'';
    position:absolute;
    top:100%;
    left:50%;
    transform:translateX(-50%);
    width:0;
    height:0;
    border-top:0.5rem solid #fff;
    border-left:0.5rem solid transparent;
    border-right:0.5rem solid transparent;
    z-index:1;
}
.ai-support-close-btn{
    position:absolute;
    top: -8.4rem;
    right: -2rem;
    width:2.8rem;
    height:2.8rem;
    border-radius:50%;
    background:url('https://nativecamp-public-web-production.s3-ap-northeast-1.amazonaws.com/teacher/webroot/images/aisupport/button_close_modal.svg') no-repeat center center;
    cursor:pointer;border:none;z-index:10000;}
span.ai-text-en{
    font-size:18px;
    letter-spacing:0;
}