/* =========================================================
   STUDIFYSUCCESS CHATBOT — APP-MATCHED LIGHT PINKISH THEME
   Colors matched to the StudifySuccess mobile app
   ========================================================= */

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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* =========================
   PAGE BACKGROUND
   Matches app: #fff8fa
   ========================= */

body {
    background: #fff8fa;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

/* Subtle pinkish radial glow top-right */
body::before {
    content: '';
    position: fixed;
    top: -80px;
    right: -60px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(171, 35, 70, 0.07) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* =========================
   CHAT WRAPPER
   ========================= */

.chat-wrapper {
    width: 100%;
    max-width: 430px;
    height: 100vh;
    max-height: 100vh;
    background: #fff8fa;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* =========================
   HEADER
   Pink-tinted white bar
   ========================= */

.chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #ffffff;
    border-bottom: 1.5px solid rgba(255, 225, 235, 0.9);
    box-shadow: 0 2px 12px rgba(171, 35, 70, 0.06);
    position: relative;
    z-index: 10;
}

.header-avatar {
    position: relative;
    flex-shrink: 0;
}

.avatar-emoji {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #ab2346 0%, #e05c7e 100%);
    border-radius: 50%;
    font-size: 20px;
    box-shadow: 0 4px 14px rgba(171, 35, 70, 0.3);
}

.online-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 11px;
    height: 11px;
    background: #007171;
    border-radius: 50%;
    border: 2px solid #ffffff;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.25); }
}

.header-info {
    flex: 1;
}

.header-info h2 {
    font-size: 15px;
    font-weight: 700;
    color: #1a2e2e;
    letter-spacing: -0.3px;
}

.status-text {
    font-size: 11px;
    color: #007171;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
    font-weight: 600;
}

.pulse {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #007171;
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

.header-actions {
    position: relative;
}

.icon-btn {
    width: 34px;
    height: 34px;
    background: rgba(255, 225, 235, 0.5);
    border: 1.5px solid rgba(171, 35, 70, 0.15);
    border-radius: 10px;
    color: #ab2346;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: rgba(255, 225, 235, 0.85);
}

/* =========================
   MENU DROPDOWN
   ========================= */

.menu-dropdown {
    display: none;
    position: absolute;
    top: 40px;
    right: 0;
    background: #ffffff;
    border: 1.5px solid rgba(255, 225, 235, 0.9);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(171, 35, 70, 0.12);
    width: 155px;
    z-index: 100;
}

.menu-dropdown button {
    width: 100%;
    padding: 11px 14px;
    background: transparent;
    border: none;
    color: #dc2626;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    transition: background 0.2s;
}

.menu-dropdown button:hover {
    background: rgba(220, 38, 38, 0.07);
}

/* =========================
   CHAT BOX
   ========================= */

.chat-box {
    flex: 1;
    padding: 16px 14px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    scroll-behavior: smooth;
    background: #fff8fa;
}

.chat-box::-webkit-scrollbar {
    width: 3px;
}

.chat-box::-webkit-scrollbar-track {
    background: transparent;
}

.chat-box::-webkit-scrollbar-thumb {
    background: rgba(171, 35, 70, 0.15);
    border-radius: 4px;
}

/* =========================
   WELCOME CARD
   Pinkish frosted glass
   ========================= */

.welcome-card {
    background: linear-gradient(135deg, rgba(255,225,235,0.7) 0%, rgba(255,240,245,0.9) 100%);
    border: 1.5px solid rgba(171, 35, 70, 0.12);
    border-radius: 20px;
    padding: 22px 18px;
    text-align: center;
    max-width: 100%;
    margin: auto 0;
    box-shadow: 0 4px 20px rgba(171, 35, 70, 0.08);
}

.welcome-icon {
    font-size: 46px;
    margin-bottom: 10px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.welcome-card h3 {
    font-size: 19px;
    font-weight: 700;
    color: #1a2e2e;
    margin-bottom: 7px;
}

.welcome-card p {
    font-size: 13px;
    color: #4a6060;
    line-height: 1.6;
    margin-bottom: 18px;
}

/* =========================
   ROLE BUTTONS
   Matched to app teal primary
   ========================= */

.role-buttons {
    display: flex;
    gap: 10px;
}

.role-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 13px 10px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Inter', sans-serif;
}

.student-btn {
    background: linear-gradient(135deg, #007171, #009999);
    color: white;
    box-shadow: 0 4px 16px rgba(0, 113, 113, 0.3);
}

.intern-btn {
    background: linear-gradient(135deg, #ab2346, #e05c7e);
    color: white;
    box-shadow: 0 4px 16px rgba(171, 35, 70, 0.3);
}

.role-btn:hover {
    transform: translateY(-3px);
}

.role-btn:active {
    transform: scale(0.97);
}

.role-icon {
    font-size: 22px;
}

.role-label {
    font-size: 13px;
    font-weight: 700;
}

.role-sub {
    font-size: 10px;
    opacity: 0.85;
}

/* =========================
   MESSAGE BUBBLES
   ========================= */

.bot-message,
.user-message {
    padding: 11px 15px;
    max-width: 82%;
    line-height: 1.6;
    font-size: 14px;
    word-wrap: break-word;
    animation: message-in 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes message-in {
    from { opacity: 0; transform: scale(0.88) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Bot bubble — soft lavender-pink (matches app EEF0FA) */
.bot-message {
    background: #ffffff;
    border: 1.5px solid rgba(255, 225, 235, 0.9);
    color: #1a2e2e;
    border-radius: 18px 18px 18px 4px;
    align-self: flex-start;
    margin-bottom: 6px;
    box-shadow: 0 2px 8px rgba(171, 35, 70, 0.07);
}

/* User bubble — teal gradient (app primary) */
.user-message {
    background: linear-gradient(135deg, #007171, #009999);
    color: #ffffff;
    border-radius: 18px 18px 4px 18px;
    align-self: flex-end;
    margin-left: auto;
    margin-bottom: 6px;
    box-shadow: 0 4px 14px rgba(0, 113, 113, 0.28);
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 13px 16px;
    background: #ffffff;
    border: 1.5px solid rgba(255, 225, 235, 0.9);
    border-radius: 18px 18px 18px 4px;
    align-self: flex-start;
    width: fit-content;
    margin-bottom: 6px;
    box-shadow: 0 2px 8px rgba(171, 35, 70, 0.06);
}

.typing-dot {
    width: 7px;
    height: 7px;
    background: #ab2346;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.35; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* =========================
   QUICK CHIPS
   Soft pinkish pill chips
   ========================= */

.quick-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 8px 14px 10px;
    overflow-x: auto;
    scrollbar-width: none;
    background: #ffffff;
    border-top: 1.5px solid rgba(255, 225, 235, 0.8);
}

.quick-chips::-webkit-scrollbar { display: none; }

.quick-chips button {
    flex-shrink: 0;
    background: rgba(255, 225, 235, 0.5);
    border: 1.5px solid rgba(171, 35, 70, 0.18);
    color: #ab2346;
    border-radius: 20px;
    padding: 6px 13px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.quick-chips button:hover:not(:disabled) {
    background: rgba(255, 225, 235, 0.9);
    border-color: rgba(171, 35, 70, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(171, 35, 70, 0.12);
}

.quick-chips button:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

/* =========================
   INPUT AREA
   ========================= */

.input-area {
    padding: 10px 14px 14px;
    background: #ffffff;
    border-top: 1.5px solid rgba(255, 225, 235, 0.8);
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff8fa;
    border: 1.5px solid rgba(171, 35, 70, 0.15);
    border-radius: 16px;
    padding: 8px 8px 8px 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrapper:focus-within {
    border-color: rgba(0, 113, 113, 0.4);
    box-shadow: 0 0 0 3px rgba(0, 113, 113, 0.08);
}

.input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 14px;
    color: #1a2e2e;
    font-family: 'Inter', sans-serif;
}

.input-wrapper input::placeholder {
    color: #8fa8a8;
}

.input-wrapper input:disabled {
    cursor: not-allowed;
    color: #c0cece;
}

/* =========================
   SEND BUTTON
   App teal primary
   ========================= */

.send-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    background: linear-gradient(135deg, #007171, #009999);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(0, 113, 113, 0.32);
}

.send-btn:hover:not(:disabled) {
    transform: scale(1.08);
    box-shadow: 0 5px 16px rgba(0, 113, 113, 0.45);
}

.send-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.send-btn:disabled {
    background: rgba(171, 35, 70, 0.1);
    box-shadow: none;
    color: #c0aab2;
    cursor: not-allowed;
}

/* =========================
   LISTS IN MESSAGES
   ========================= */

ul {
    margin-top: 8px;
    margin-left: 18px;
}

ul li {
    margin-bottom: 4px;
    color: #2a4040;
}