/* Virat Group — genie-page.css | virat-genie.html full-page AI chat (v4 design system) */

.genie-fullpage {
    margin-top: var(--v4-header-h);
    height: calc(100vh - var(--v4-header-h));
    height: calc(100dvh - var(--v4-header-h));
    background: #fff;
    display: flex;
    flex-direction: column;
}

@media (max-width: 640px) {
    .genie-fullpage { margin-top: 64px; height: calc(100vh - 64px); height: calc(100dvh - 64px); }
}

/* ── HEADER ── */
.genie-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 28px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--v4-navy-900), var(--v4-navy-950));
    border-bottom: 1px solid rgba(201, 161, 92, 0.2);
}
.genie-header-title { display: flex; align-items: center; gap: 14px; }
.genie-header-avatar {
    width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; position: relative;
    background: var(--v4-gold-soft); border: 1px solid rgba(201, 161, 92, 0.4);
    display: flex; align-items: center; justify-content: center;
}
.genie-header-avatar i { color: var(--v4-gold-light); font-size: 18px; }
.genie-header-avatar .genie-mark { max-width: 80%; max-height: 80%; width: auto; height: auto; object-fit: contain; }
.genie-header-status {
    position: absolute; bottom: -1px; right: -1px; width: 11px; height: 11px;
    border-radius: 50%; background: #3ecf6a; border: 2px solid var(--v4-navy-950);
}
.genie-header-title strong { display: block; font-family: 'Playfair Display', serif; font-size: 17px; font-weight: 700; color: #fff; }
.genie-header-title span { display: block; font-size: 12px; color: rgba(255, 255, 255, 0.55); margin-top: 2px; }

/* ── MESSAGES ── */
.genie-body {
    flex: 1; overflow-x: hidden; overflow-y: auto;
    padding: 26px 28px; display: flex; flex-direction: column; gap: 16px;
    background: var(--v4-off-white);
    scrollbar-width: thin; scrollbar-color: rgba(201, 161, 92, 0.4) transparent;
}
.genie-body::-webkit-scrollbar { width: 6px; }
.genie-body::-webkit-scrollbar-thumb { background: rgba(201, 161, 92, 0.4); border-radius: 6px; }
.genie-body::-webkit-scrollbar-thumb:hover { background: var(--v4-gold); }

.genie-row { display: flex; align-items: flex-end; gap: 10px; max-width: min(640px, 88%); animation: genieMsgIn 0.28s cubic-bezier(0.22, 1, 0.36, 1); }
.genie-row-bot { align-self: flex-start; }
.genie-row-user { align-self: flex-end; flex-direction: row-reverse; }

.genie-avatar { width: 34px; height: 34px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.genie-avatar i { color: var(--v4-gold-dark); font-size: 12px; }
.genie-avatar .genie-mark { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.genie-mark { display: block; }

.genie-msg {
    min-width: 0; padding: 13px 17px; border-radius: 16px; font-size: 14px; line-height: 1.6;
    word-wrap: break-word; box-shadow: 0 1px 3px rgba(13, 31, 60, 0.05);
}
.genie-msg-bot { background: #fff; color: var(--v4-navy-900); border: 1px solid var(--v4-line); border-bottom-left-radius: 4px; }
.genie-msg-user {
    background: linear-gradient(135deg, var(--v4-gold-light), var(--v4-gold) 65%, var(--v4-gold-dark));
    color: var(--v4-navy-950); font-weight: 500; border-bottom-right-radius: 4px;
}
.genie-msg-lead { background: var(--v4-gold-soft); border: 1px solid rgba(201, 161, 92, 0.35); color: var(--v4-navy-900); font-size: 13.5px; }
.genie-msg-lead i { color: var(--v4-gold-dark); margin-right: 5px; }

.genie-chips { display: flex; flex-wrap: wrap; gap: 9px; align-self: flex-start; width: 100%; max-width: 100%; box-sizing: border-box; padding-left: 44px; animation: genieMsgIn 0.28s cubic-bezier(0.22, 1, 0.36, 1); }
.genie-chip {
    max-width: 100%; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--v4-line);
    background: #fff; color: var(--v4-navy-900); font-size: 13px; font-weight: 600; white-space: normal;
    box-shadow: 0 1px 2px rgba(13, 31, 60, 0.04); transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.genie-chip:hover { background: var(--v4-gold); border-color: var(--v4-gold); color: #fff; transform: translateY(-1px); }

.genie-msg-typing { display: flex; gap: 4px; padding: 14px 17px; background: #fff; border: 1px solid var(--v4-line); border-radius: 16px; border-bottom-left-radius: 4px; }
.genie-msg-typing span { width: 6px; height: 6px; border-radius: 50%; background: #c3c8d1; animation: genieTyping 1.2s infinite ease-in-out; }
.genie-msg-typing span:nth-child(2) { animation-delay: 0.15s; }
.genie-msg-typing span:nth-child(3) { animation-delay: 0.3s; }

/* ── INPUT ── */
.genie-input-row { display: flex; align-items: center; gap: 10px; padding: 18px 24px; border-top: 1px solid var(--v4-line); background: #fff; flex-shrink: 0; }
.genie-input { flex: 1; border: 1.5px solid var(--v4-line); border-radius: 999px; padding: 13px 20px; font-size: 14.5px; font-family: inherit; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.genie-input:focus { border-color: var(--v4-gold); box-shadow: 0 0 0 3px var(--v4-gold-soft); }
.genie-send {
    width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, var(--v4-gold-light), var(--v4-gold-dark));
    color: var(--v4-navy-950); display: flex; align-items: center; justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 4px 14px rgba(201, 161, 92, 0.35);
}
.genie-send:hover { transform: scale(1.06); }
.genie-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

@keyframes genieTyping { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes genieMsgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
    .genie-header { padding: 14px 18px; }
    .genie-header-avatar { width: 38px; height: 38px; }
    .genie-header-title strong { font-size: 15.5px; }
    .genie-header-title span { font-size: 11px; }

    .genie-body { padding: 16px; gap: 12px; }
    .genie-row { max-width: 94%; gap: 8px; }
    .genie-avatar { width: 28px; height: 28px; }
    .genie-msg { padding: 11px 14px; font-size: 13.5px; }
    .genie-chips { padding-left: 0; gap: 7px; }
    .genie-chip { padding: 8px 14px; font-size: 12.5px; }

    .genie-input-row { padding: 10px 12px; gap: 8px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
    .genie-input { padding: 11px 16px; font-size: 14px; }
    .genie-send { width: 40px; height: 40px; }
}
