@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary: #F37E04;
    --primary-hover: #d66d03;
    --bg-light: #F2F4F7;
    --white: #FFFFFF;
    --text-dark: #101828;
    --text-muted: #667085;
    --border-color: #D0D5DD;
    --chat-bubble-ai: #FFFFFF;
    --chat-bubble-user: #F37E04;
    --shadow: 0 1px 3px rgba(16, 24, 40, 0.1), 0 1px 2px rgba(16, 24, 40, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: -webkit-fill-available;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    height: 100vh;
    height: 100dvh;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent page bounce */
}




/* Header & Progress */
header {
    flex-shrink: 0;
    background: var(--primary);
    padding: 1rem;
    color: var(--white);
    z-index: 10;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 80px;
    max-height: 12vw;
    min-height: 50px;
    width: auto;
    display: block;
}

.steps-info {
    font-weight: 600;
    font-size: 0.9rem;
}

.progress-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: var(--white);
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}


.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Chat Area */
main {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    scroll-behavior: smooth;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.message {
    display: flex;
    gap: 0.75rem;
    max-width: 85%;
    animation: fadeInUp 0.4s ease-out forwards;
}

.message.ai {
    align-self: flex-start;
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bubble {
    padding: 1rem 1.25rem;
    border-radius: 1.25rem;
    font-size: 1rem;
    line-height: 1.5;
    position: relative;
    box-shadow: var(--shadow);
}

.ai .bubble {
    background: var(--white);
    color: var(--text-dark);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-color);
}

.user .bubble {
    background: var(--primary);
    color: var(--white);
    border-bottom-right-radius: 4px;
}

/* Typing Indicator */
.typing {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 16px 20px;
    background: var(--white);
    border-radius: 20px;
    border-bottom-left-radius: 4px;
    width: fit-content;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}


.dot {
    width: 8px;
    height: 8px;
    background: #CBD5E0;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Input Area */
.input-section {
    flex-shrink: 0;
    background: var(--white);
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    width: 100%;
}

.input-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    display: flex;
    gap: 0.75rem;
}

input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
    font-family: inherit;
}

input:focus {
    border-color: var(--primary);
}

.send-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
}

.send-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.send-btn:disabled {
    background: #CCC;
    cursor: not-allowed;
}

.footer-text {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

.hidden {
    display: none !important;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .message { max-width: 92%; }
    header { padding: 0.75rem 1rem; }
    main { padding: 1rem; }
    .input-section { padding: 1rem; }
    .logo img { height: 50px; min-height: 40px; }
}

