/* Jane V1 — sitewide dock + full-page chat styles. Phase 1c.
   Matches existing WeddingVenture brand (sitecolors/colordefault.less):
       primary       #6ac8c7
       primary-dark  #068887
       primary-light #f0fafb
       text-primary  #404040
       text-secondary #8e8e8e
   Body font is SourceSansPro (already preloaded in _Layout.cshtml as a
   self-hosted webfont). Buttons use the site's signature
   inset 0 -4px 0 0 dark accent.
*/

/* ---- Dock root ---- */
.jane-dock {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
    font-family: SourceSansPro, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #404040;
    line-height: 1.4;
}

.jane-dock--dismissed { display: none !important; }

/* ---- Collapsed: welcome bubble ---- */
.jane-dock__bubble {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #d6e5e5;
    border-radius: 28px;
    padding: 10px 16px 10px 12px;
    box-shadow: 0 4px 16px rgba(6, 136, 135, 0.18);
    cursor: pointer;
    text-align: left;
    max-width: 320px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
    color: inherit;
}
.jane-dock__bubble:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(6, 136, 135, 0.24); }
.jane-dock__bubble:focus { outline: 2px solid #6ac8c7; outline-offset: 2px; }

.jane-dock__bubble-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #f0fafb;
    color: #068887;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.jane-dock__bubble-text { display: flex; flex-direction: column; }
.jane-dock__bubble-text strong { font-weight: 600; color: #404040; }
.jane-dock__bubble-tag { font-size: 12px; color: #8e8e8e; }
.jane-dock__bubble-close {
    margin-left: 4px;
    color: #8e8e8e;
    font-size: 18px;
    line-height: 1;
    padding: 4px;
    border-radius: 50%;
    cursor: pointer;
}
.jane-dock__bubble-close:hover { color: #404040; background: #f0fafb; }

/* Hide bubble when expanded; hide panel when collapsed */
.jane-dock--expanded .jane-dock__bubble { display: none; }
.jane-dock--collapsed .jane-dock__panel { display: none; }

/* ---- Expanded: chat panel ---- */
.jane-dock__panel {
    width: 360px;
    height: 540px;
    max-height: calc(100vh - 32px);
    background: #fff;
    border: 1px solid #d6e5e5;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(6, 136, 135, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.jane-dock__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: #6ac8c7;
    box-shadow: inset 0 -4px 0 0 #068887;
    color: #fff;
}
.jane-dock__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 15px;
    font-family: inherit;
}
.jane-dock__title-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 16px;
}
.jane-dock__close {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0 8px;
    opacity: 0.85;
    text-decoration: none;
}
.jane-dock__close:hover { opacity: 1; color: #fff; }

.jane-dock__messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #fafefe;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
}

.jane-dock__message {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    word-wrap: break-word;
    white-space: pre-wrap;
}
.jane-dock__message--assistant {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #d6e5e5;
    border-bottom-left-radius: 4px;
    color: #404040;
}
.jane-dock__message--user {
    align-self: flex-end;
    background: #6ac8c7;
    color: #fff;
    border-bottom-right-radius: 4px;
}
.jane-dock__message--error {
    align-self: stretch;
    background: #fff5ee;
    color: #cc762c;
    border: 1px solid #ffaa62;
    text-align: center;
    font-size: 13px;
}

.jane-dock__typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 16px 8px;
    background: #fafefe;
}
.jane-dock__typing span {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #068887;
    opacity: 0.4;
    animation: jane-typing 1.4s infinite;
}
.jane-dock__typing span:nth-child(2) { animation-delay: 0.2s; }
.jane-dock__typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes jane-typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30%           { transform: translateY(-4px); opacity: 1; }
}

.jane-dock__composer {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid #d6e5e5;
    background: #fff;
}
.jane-dock__input {
    flex: 1;
    border: 1px solid #d6e5e5;
    border-radius: 18px;
    padding: 8px 14px;
    resize: none;
    font-family: inherit;
    font-size: inherit;
    color: #404040;
    line-height: 1.4;
    max-height: 96px;
    overflow-y: auto;
    background: #fff;
}
.jane-dock__input:focus { outline: none; border-color: #6ac8c7; box-shadow: 0 0 0 3px rgba(106, 200, 199, 0.2); }
.jane-dock__input::placeholder { color: #8e8e8e; }

/* Send button matches site button-icon (35px) + brand color + signature inset bottom-edge accent. */
.jane-dock__send {
    width: 36px; height: 36px;
    border: 0;
    border-radius: 50%;
    background: #6ac8c7;
    box-shadow: inset 0 -3px 0 0 #068887;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease;
    font-family: inherit;
}
.jane-dock__send:hover:not(:disabled) { background: #068887; box-shadow: inset 0 -3px 0 0 #056463; }
.jane-dock__send:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Mobile: full-screen overlay when expanded ---- */
@media (max-width: 600px) {
    .jane-dock--expanded {
        right: 0; bottom: 0; left: 0; top: 0;
    }
    .jane-dock--expanded .jane-dock__panel {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        border: 0;
    }
}

/* ---- Full-page chat (Views/Jane/Index.cshtml) reuses styles ---- */
.jane-page {
    max-width: 720px;
    margin: 32px auto;
    padding: 0 16px;
}
.jane-page__panel {
    height: calc(100vh - 200px);
    min-height: 480px;
    width: 100%;
    border: 1px solid #d6e5e5;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(6, 136, 135, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.jane-page__panel .jane-dock__panel {
    width: 100%;
    height: 100%;
    max-height: none;
    border: 0;
    box-shadow: none;
    border-radius: 0;
}
