/* 정부24 AI 모드 스타일 — 한국도로공사 AI 챗봇 */ :root { --ai-primary: #246beb; --ai-primary-dark: #1b53b7; --ai-bg: #ffffff; --ai-surface: #ffffff; --ai-border: #e4e7ec; --ai-text: #111827; --ai-subtext: #6b7280; --ai-user-bg: #eef4ff; --ai-max-width: 760px; } html.ai-mode, html.ai-mode body { background: var(--ai-bg); color: var(--ai-text); overflow: hidden; } .ai-app { display: flex; flex-direction: column; width: 100%; height: 100vh; height: 100dvh; min-height: 100vh; min-height: 100dvh; background: var(--ai-bg); } .ai-header { flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: calc(14px + env(safe-area-inset-top, 0px)) 20px 12px; background: var(--ai-surface); border-bottom: none; z-index: 20; } .ai-app--chat .ai-header { border-bottom: 1px solid var(--ai-border); } .ai-header-brand { flex: 1; min-width: 0; overflow: hidden; } .ai-header-brand .ex-brand { max-width: 100%; } .ai-header-brand .ex-brand-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ai-location { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: #374151; } .ai-location-icon { flex-shrink: 0; color: var(--ai-primary); } .ai-location-label { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; } .ai-brand { display: flex; align-items: center; gap: 10px; min-width: 0; } .ai-brand-mark { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #246beb 0%, #1a4fa8 100%); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; letter-spacing: -0.02em; flex-shrink: 0; } .ai-brand-text { min-width: 0; } .ai-brand-title { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; letter-spacing: -0.02em; } .ai-brand-sub { margin: 2px 0 0; font-size: 12px; color: var(--ai-subtext); line-height: 1.3; } .ai-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-shrink: 0; margin-left: auto; } .ai-btn-ghost { border: 1px solid var(--ai-border); background: var(--ai-surface); color: var(--ai-text); border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer; white-space: nowrap; flex-shrink: 0; transition: background 0.15s ease, border-color 0.15s ease; } .ai-btn-ghost.is-open { background: #eef4ff; border-color: #bfd3ff; color: var(--ai-primary-dark); } .ai-btn-close { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--ai-border); border-radius: 50%; background: var(--ai-surface); color: var(--ai-text); cursor: pointer; flex-shrink: 0; transition: background 0.15s ease, border-color 0.15s ease; } .ai-btn-close:hover { background: #f9fafb; border-color: #cbd5e1; } .ai-btn-close:active { transform: scale(0.96); } .ai-btn-ghost:hover:not(:disabled) { background: #f9fafb; border-color: #cbd5e1; } .ai-btn-ghost:disabled { opacity: 0.5; cursor: not-allowed; } .ai-main { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; scroll-behavior: smooth; } .ai-app--landing .ai-main { flex: 1; display: flex; flex-direction: column; } .ai-app--landing .ai-main-inner { flex: 1; display: flex; flex-direction: column; justify-content: center; } .ai-main-inner { width: 100%; max-width: var(--ai-max-width); margin: 0 auto; padding: 16px 20px 16px; } .ai-app--landing .ai-main-inner { max-width: 960px; } .ai-hero { padding: clamp(12px, 3vh, 28px) 0 clamp(16px, 4vh, 32px); } .ai-hero-layout { display: flex; align-items: center; justify-content: space-between; gap: clamp(16px, 4vw, 40px); } .ai-hero-copy { flex: 1 1 0; min-width: 0; text-align: left; } .ai-hero-visual { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: min(42vw, 220px); max-width: 220px; } .ai-hero-mascot { display: block; width: 100%; height: auto; object-fit: contain; } .ai-hero-greeting { margin: 0; font-size: clamp(30px, 7vw, 42px); font-weight: 800; line-height: 1.2; letter-spacing: -0.04em; color: #0f766e; } .ai-hero-question { margin: 8px 0 0; font-size: clamp(28px, 6.5vw, 38px); font-weight: 800; line-height: 1.25; letter-spacing: -0.04em; color: var(--ai-primary); } .ai-hero-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; margin-bottom: 16px; border-radius: 999px; background: #eef4ff; color: var(--ai-primary); font-size: 12px; font-weight: 700; } .ai-hero-title { margin: 0; font-size: clamp(28px, 6vw, 36px); font-weight: 800; line-height: 1.25; letter-spacing: -0.03em; } .ai-hero-subtitle { margin: 10px 0 0; font-size: clamp(16px, 3.5vw, 18px); color: var(--ai-subtext); line-height: 1.5; } .ai-hero-faq { margin-top: clamp(20px, 4vh, 32px); width: 100%; max-width: 520px; } .ai-hero-faq-title { margin: 0 0 12px; font-size: 13px; font-weight: 700; color: var(--ai-subtext); letter-spacing: -0.01em; text-align: left; } .ai-hero-faq-loading { margin: 0; font-size: 14px; color: var(--ai-subtext); text-align: left; } .ai-suggestions { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; margin-top: 0; } .ai-suggestion-chip { border: 1px solid var(--ai-border); background: var(--ai-surface); color: var(--ai-text); border-radius: 999px; padding: 10px 16px; font-size: 14px; line-height: 1.35; font-family: inherit; cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); } .ai-suggestion-chip:hover:not(:disabled) { border-color: #93c5fd; background: #f8fbff; } .ai-suggestion-chip:active:not(:disabled) { transform: scale(0.98); } .ai-suggestion-chip:disabled { opacity: 0.55; cursor: not-allowed; } .ai-thread { display: flex; flex-direction: column; gap: 20px; padding-bottom: 8px; } .ai-msg { display: flex; flex-direction: column; gap: 6px; } .ai-msg.user { align-items: flex-end; } .ai-msg.assistant { align-items: flex-start; } .ai-msg-label { font-size: 12px; font-weight: 700; color: var(--ai-subtext); padding: 0 4px; } .ai-msg-bubble { max-width: min(92%, 640px); padding: 14px 16px; border-radius: 16px; font-size: 15px; line-height: 1.65; word-break: break-word; } .ai-msg.user .ai-msg-bubble { background: var(--ai-user-bg); border: 1px solid #dbeafe; border-bottom-right-radius: 4px; white-space: pre-wrap; } .ai-msg.assistant .ai-msg-bubble { background: var(--ai-surface); border: 1px solid var(--ai-border); border-bottom-left-radius: 4px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); } .ai-msg-bubble .md-content { font-size: 15px; } .ai-loading { display: inline-flex; align-items: center; gap: 8px; color: var(--ai-subtext); } .ai-loading-dots { display: inline-flex; gap: 4px; } .ai-loading-dots span { width: 6px; height: 6px; border-radius: 50%; background: #94a3b8; animation: ai-bounce 1.2s infinite ease-in-out; } .ai-loading-dots span:nth-child(2) { animation-delay: 0.15s; } .ai-loading-dots span:nth-child(3) { animation-delay: 0.3s; } @keyframes ai-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: 0.45; } 40% { transform: translateY(-4px); opacity: 1; } } .ai-composer-wrap { flex-shrink: 0; background: transparent; border-top: none; padding: 8px 20px calc(16px + env(safe-area-inset-bottom, 0px)); } .ai-app--landing .ai-composer-wrap { margin-top: auto; } .ai-composer-inner { width: 100%; max-width: var(--ai-max-width); margin: 0 auto; } .ai-composer-box { display: flex; align-items: flex-end; gap: 4px; padding: 8px 10px 8px 22px; border: 1.5px solid transparent; border-radius: 9999px; background: linear-gradient(var(--ai-surface), var(--ai-surface)) padding-box, linear-gradient(90deg, #14b8a6 0%, var(--ai-primary) 100%) border-box; box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06); transition: box-shadow 0.15s ease; } .ai-composer-box:focus-within { box-shadow: 0 4px 18px rgba(36, 107, 235, 0.12); } .ai-composer-input { flex: 1; min-width: 0; min-height: 24px; max-height: 120px; border: none; outline: none; resize: none; background: transparent; font-size: 16px; line-height: 1.5; font-family: inherit; color: var(--ai-text); padding: 8px 0; } .ai-composer-input::placeholder { color: #9ca3af; } .ai-composer-input:disabled { opacity: 0.6; } .ai-composer-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; } .ai-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: none; border-radius: 50%; background: transparent; color: #4b5563; cursor: pointer; transition: color 0.15s ease, background 0.15s ease; } .ai-icon-btn:hover:not(:disabled) { background: #f1f5f9; color: var(--ai-primary); } .ai-icon-btn:disabled { opacity: 0.4; cursor: not-allowed; } .ai-icon-btn.listening { background: #fee2e2; color: #ef4444; } .ai-icon-btn.unsupported { opacity: 0.85; } .ai-send-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: none; border-radius: 50%; background: transparent; color: #4b5563; cursor: pointer; transition: color 0.15s ease, background 0.15s ease; } .ai-send-btn:disabled { opacity: 0.35; cursor: not-allowed; } .ai-send-btn.is-ready { color: #374151; } .ai-send-btn.is-ready:hover:not(:disabled) { color: var(--ai-primary); background: rgba(36, 107, 235, 0.06); } .ai-send-btn.is-ready:active { transform: scale(0.96); } .ai-footer-note { margin: 10px 4px 0; font-size: 11px; line-height: 1.5; color: #9ca3af; text-align: center; } .ai-faq-bar { flex-shrink: 0; border-top: 1px solid var(--ai-border); background: #f9fafb; padding: 10px 0 calc(8px + env(safe-area-inset-bottom, 0px)); } .ai-faq-bar-head { max-width: var(--ai-max-width); margin: 0 auto 8px; padding: 0 16px; font-size: 12px; font-weight: 700; color: var(--ai-subtext); letter-spacing: -0.01em; } .ai-faq-bar-scroll { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 0 16px 2px; max-width: var(--ai-max-width); margin: 0 auto; } .ai-faq-bar-scroll::-webkit-scrollbar { display: none; } .ai-faq-bar-empty { margin: 0; padding: 4px 0; font-size: 13px; color: var(--ai-subtext); white-space: nowrap; } .ai-faq-chip { flex-shrink: 0; border: 1px solid var(--ai-border); background: var(--ai-surface); color: var(--ai-text); border-radius: 999px; padding: 8px 14px; font-size: 13px; line-height: 1.35; font-family: inherit; cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease; max-width: min(280px, 72vw); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ai-faq-chip:hover:not(:disabled) { border-color: #93c5fd; background: #eef4ff; } .ai-faq-chip:disabled { opacity: 0.55; cursor: not-allowed; } /* AI 모드 — 헤더 FAQ 드롭다운 */ html.ai-mode .faq-panel { left: auto; right: 16px; bottom: auto; top: calc(56px + env(safe-area-inset-top, 0px)); transform: none; width: min(calc(100vw - 32px), 360px); max-height: min(58vh, 520px); } html.ai-mode .ai-app--embed .faq-panel { right: 12px; } .ai-quick-replies { margin-top: 10px; max-width: min(92%, 640px); } .ai-quick-replies .quick-reply-title { color: var(--ai-subtext); } .ai-quick-replies .quick-reply-chip { border-color: var(--ai-border); border-radius: 999px; } .ai-quick-replies .quick-reply-chip:hover:not(:disabled) { background: #eef4ff; border-color: #93c5fd; } .ai-list-cards { margin-top: 10px; max-width: min(92%, 640px); } .ai-list-cards .list-card { border-radius: 12px; } .ai-list-cards .fare-result-card { max-width: 100%; } @media (max-width: 560px) { .ai-header { padding-left: 14px; padding-right: 14px; } .ai-btn-ghost { padding: 8px 12px; font-size: 12px; } .ai-hero-layout { flex-direction: column-reverse; align-items: stretch; text-align: center; } .ai-hero-copy { text-align: center; } .ai-hero-faq-title, .ai-hero-faq-loading { text-align: center; } .ai-suggestions { justify-content: center; } .ai-hero-visual { width: min(56vw, 180px); max-width: none; margin: 0 auto; } } @media (min-width: 768px) { .ai-header { padding-left: 28px; padding-right: 28px; } .ai-main-inner, .ai-composer-inner, .ai-faq-bar-head, .ai-faq-bar-scroll { padding-left: 28px; padding-right: 28px; } .ai-composer-wrap { padding-left: 28px; padding-right: 28px; } } /* ── 음성 입력 오버레이 (정부24 하단 시트 스타일) ── */ .ai-voice-overlay { position: fixed; left: 0; right: 0; bottom: 0; z-index: 100; pointer-events: none; } .ai-voice-sheet { position: relative; pointer-events: auto; overflow: visible; background: linear-gradient( 180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.88) 14%, #ffffff 28%, #ffffff 100% ); border-radius: 28px 28px 0 0; box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.06), 0 -1px 0 rgba(255, 255, 255, 0.8) inset; } .ai-voice-sheet-fade { position: absolute; left: 0; right: 0; top: -72px; height: 72px; pointer-events: none; background: linear-gradient( 180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.35) 45%, rgba(255, 255, 255, 0.82) 100% ); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); mask-image: linear-gradient(180deg, transparent 0%, #000 72%); -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 72%); } .ai-voice-sheet-body { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 8px 24px calc(20px + env(safe-area-inset-bottom, 0px)); } .ai-voice-mic-btn { position: relative; width: 92px; height: 92px; margin-top: 4px; padding: 0; border: none; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; } .ai-voice-mic-btn:active { transform: scale(0.96); } .ai-voice-mic-ring { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity 0.25s ease; } .ai-voice-mic-btn.is-listening .ai-voice-mic-ring--1, .ai-voice-mic-btn.is-speaking .ai-voice-mic-ring--1 { opacity: 1; inset: -6px; border: 2px solid rgba(36, 107, 235, 0.35); animation: ai-voice-ring-pulse 2.2s ease-out infinite; } .ai-voice-mic-btn.is-speaking .ai-voice-mic-ring--2 { opacity: 1; inset: -14px; border: 1.5px solid rgba(15, 118, 110, 0.35); animation: ai-voice-ring-pulse 2.2s ease-out infinite 0.35s; } .ai-voice-mic-core { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%; color: #fff; background: linear-gradient(145deg, #10b981 0%, #0ea5e9 42%, #246beb 100%); box-shadow: 0 10px 32px rgba(36, 107, 235, 0.32), 0 2px 8px rgba(16, 185, 129, 0.25); transition: box-shadow 0.25s ease, transform 0.2s ease; } .ai-voice-mic-btn.is-listening .ai-voice-mic-core { animation: ai-voice-mic-glow 2.4s ease-in-out infinite; } .ai-voice-mic-btn.is-speaking .ai-voice-mic-core { animation: ai-voice-mic-glow 1s ease-in-out infinite; } .ai-voice-waveform { display: flex; align-items: flex-end; justify-content: center; gap: 4px; width: min(100%, 280px); height: 36px; opacity: 0.45; transition: opacity 0.25s ease; } .ai-voice-waveform.is-listening { opacity: 1; } .ai-voice-wave-bar { display: block; flex: 0 0 5px; width: 5px; min-height: var(--bar-min, 6px); height: var(--bar-min, 6px); border-radius: 999px; background: linear-gradient(180deg, #34d399 0%, #22d3ee 45%, #3b82f6 100%); transform-origin: center bottom; } .ai-voice-waveform.is-listening .ai-voice-wave-bar { animation-name: ai-voice-eq; animation-timing-function: ease-in-out; animation-iteration-count: infinite; animation-direction: alternate; } .ai-voice-waveform.is-speaking .ai-voice-wave-bar { animation-direction: alternate-reverse; } .ai-voice-status-pill { margin: 0; padding: 10px 22px; font-size: 14px; font-weight: 600; color: #1f2937; background: #fff; border: 1px solid #e0e7ff; border-radius: 999px; box-shadow: 0 2px 10px rgba(36, 107, 235, 0.07); max-width: min(92vw, 420px); text-align: center; line-height: 1.45; word-break: keep-all; } .ai-voice-status-pill.is-error { color: #b45309; border-color: #fde68a; background: #fffbeb; } .ai-voice-interim { margin: -4px 0 0; max-width: min(92vw, 420px); font-size: 14px; line-height: 1.5; color: #6b7280; text-align: center; word-break: keep-all; } @keyframes ai-voice-ring-pulse { 0% { transform: scale(1); opacity: 0.65; } 100% { transform: scale(1.4); opacity: 0; } } @keyframes ai-voice-mic-glow { 0%, 100% { box-shadow: 0 10px 32px rgba(36, 107, 235, 0.28), 0 0 0 0 rgba(36, 107, 235, 0.15); } 50% { box-shadow: 0 14px 40px rgba(36, 107, 235, 0.42), 0 0 0 12px rgba(36, 107, 235, 0.05); } } @keyframes ai-voice-eq { 0% { height: var(--bar-min, 6px); transform: scaleY(0.85); } 100% { height: var(--bar-max, 20px); transform: scaleY(1); } }