/*
 * AiMee OS
 * Footer consistency update
 */


/* ---------------------------------
   Critical Hidden State
---------------------------------- */

.aimee-os [hidden],
.aimee-os-channel-menu[hidden],
.aimee-os-panel-overlay[hidden],
.aimee-os-navigation[hidden] {
    display: none !important;
}


/* ---------------------------------
   Core
---------------------------------- */

.aimee-os {
    --aimee-accent: #ec168c;
    --aimee-avatar-size: 90px;

    width: 100%;
    max-width: 760px;

    margin: 40px auto;
    padding: 20px;

    box-sizing: border-box;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
}


.aimee-os *,
.aimee-os *::before,
.aimee-os *::after {
    box-sizing: border-box;
}


/* ---------------------------------
   Main Card
---------------------------------- */

.aimee-os-card {
    width: 100%;

    padding: 38px;

    border: 1px solid #ececec;
    border-radius: 24px;

    background: #ffffff;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.08);
}


/* ---------------------------------
   Assistant Header
---------------------------------- */

.aimee-os-assistant-header {
    display: flex;
    align-items: center;

    gap: 20px;

    margin-bottom: 28px;

    min-width: 0;
}


.aimee-os-assistant-copy {
    flex: 1 1 auto;

    min-width: 0;
}


/* ---------------------------------
   Main Avatar
---------------------------------- */

.aimee-os-avatar-wrap {
    display: block;

    flex: 0 0 auto;

    width: var(--aimee-avatar-size);
    height: var(--aimee-avatar-size);

    min-width: var(--aimee-avatar-size);
    min-height: var(--aimee-avatar-size);

    max-width: var(--aimee-avatar-size);
    max-height: var(--aimee-avatar-size);

    overflow: hidden;

    border-radius: 50%;

    background: #f5f5f5;

    line-height: 0;
}


.aimee-os-avatar-wrap
.aimee-os-avatar-image {
    display: block !important;

    width: 100% !important;
    height: 100% !important;

    min-width: 100% !important;
    min-height: 100% !important;

    max-width: 100% !important;
    max-height: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    object-fit: cover !important;
    object-position: center !important;

    border: 3px solid #ffffff;
    border-radius: 50% !important;

    box-shadow:
        0 5px 18px rgba(0, 0, 0, 0.14);
}


/* ---------------------------------
   Assistant Text
---------------------------------- */

.aimee-os-label {
    display: inline-block;

    margin-bottom: 5px;

    color: var(--aimee-accent);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 1.8px;

    text-transform: uppercase;
}


.aimee-os-title {
    margin: 0 0 6px;

    color: #191919;

    font-size: 30px;
    line-height: 1.15;
}


.aimee-os-assistant-header p {
    margin: 0;

    color: #666666;

    font-size: 15px;
    line-height: 1.55;
}


/* ---------------------------------
   Main Mode Cards
---------------------------------- */

.aimee-os-mode-grid {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(
                0,
                1fr
            )
        );

    gap: 14px;
}


.aimee-os-mode-grid-single {
    grid-template-columns: 1fr;
}


.aimee-os-mode-card {
    position: relative;

    display: flex;
    align-items: center;

    gap: 14px;

    min-height: 100px;

    padding: 18px;

    border: 1px solid #e5e5e5;
    border-radius: 16px;

    background: #fafafa;

    color: #222222;

    font-family: inherit;

    text-align: left;

    cursor: pointer;

    transition:
        border-color .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}


.aimee-os-mode-card:hover {
    transform: translateY(-2px);

    border-color: var(--aimee-accent);

    background: #ffffff;

    box-shadow:
        0 8px 22px rgba(0, 0, 0, 0.07);
}


.aimee-os-mode-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 48px;
    height: 48px;

    border-radius: 14px;

    background: #ffffff;

    color: var(--aimee-accent);
}


.aimee-os-mode-icon svg {
    width: 25px;
    height: 25px;

    fill: none;

    stroke: currentColor;
    stroke-width: 1.8;

    stroke-linecap: round;
    stroke-linejoin: round;
}


.aimee-os-mode-copy {
    display: block;

    min-width: 0;
}


.aimee-os-mode-copy strong {
    display: block;

    margin-bottom: 4px;

    font-size: 15px;
}


.aimee-os-mode-copy small {
    display: block;

    color: #777777;

    font-size: 12px;
    line-height: 1.4;
}


/* ---------------------------------
   Screen Heading
---------------------------------- */

.aimee-os-screen-heading {
    display: flex;
    align-items: center;

    gap: 12px;

    margin-bottom: 22px;
    padding-bottom: 14px;

    border-bottom: 1px solid #eeeeee;
}


.aimee-os-screen-heading strong {
    font-size: 16px;
}


.aimee-os-mode-back {
    display: inline-flex;
    align-items: center;

    gap: 4px;

    padding: 7px 10px;

    border: 0;
    border-radius: 8px;

    background: #f5f5f5;

    color: #444444;

    font-family: inherit;

    cursor: pointer;
}


.aimee-os-mode-back svg {
    width: 16px;
    height: 16px;

    fill: none;

    stroke: currentColor;
    stroke-width: 2;

    stroke-linecap: round;
    stroke-linejoin: round;
}


/* ---------------------------------
   AI Chat
---------------------------------- */

.aimee-os-chat-messages {
    min-height: 280px;
    max-height: 390px;

    overflow-y: auto;

    padding: 6px 4px 18px;
}


.aimee-os-chat-row {
    display: flex;

    margin-bottom: 14px;
}


.aimee-os-chat-row-assistant {
    justify-content: flex-start;
    align-items: flex-end;

    gap: 8px;
}


.aimee-os-chat-row-user {
    justify-content: flex-end;
}


.aimee-os-chat-row-assistant img {
    display: block !important;

    flex: 0 0 34px !important;

    width: 34px !important;
    height: 34px !important;

    min-width: 34px !important;
    min-height: 34px !important;

    max-width: 34px !important;
    max-height: 34px !important;

    margin: 0 !important;
    padding: 0 !important;

    border-radius: 50% !important;

    object-fit: cover !important;
}


.aimee-os-chat-bubble {
    max-width: 78%;

    padding: 11px 14px;

    border-radius: 15px;

    background: #f2f2f2;

    color: #333333;

    font-size: 14px;
    line-height: 1.5;
}


.aimee-os-chat-row-user
.aimee-os-chat-bubble {
    background: var(--aimee-accent);

    color: #ffffff;

    border-bottom-right-radius: 5px;
}


.aimee-os-chat-row-assistant
.aimee-os-chat-bubble {
    border-bottom-left-radius: 5px;
}


.aimee-os-development-response {
    border: 1px dashed #cccccc;

    background: #fafafa;
}


.aimee-os-chat-form {
    display: flex;
    align-items: flex-end;

    gap: 8px;

    padding-top: 14px;

    border-top: 1px solid #eeeeee;
}


.aimee-os-chat-input {
    display: block;

    flex: 1;

    min-width: 0;

    min-height: 48px;
    max-height: 120px;

    padding: 12px 14px;

    border: 1px solid #dddddd;
    border-radius: 13px;

    background: #ffffff;

    color: #222222;

    font: inherit;

    resize: vertical;
}


.aimee-os-chat-input:focus {
    border-color: var(--aimee-accent);

    outline:
        2px solid rgba(236, 22, 140, 0.10);
}


.aimee-os-chat-send {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 48px;

    width: 48px;
    height: 48px;

    padding: 0;

    border: 0;
    border-radius: 13px;

    background: var(--aimee-accent);

    color: #ffffff;

    cursor: pointer;
}


.aimee-os-chat-send svg {
    width: 21px;
    height: 21px;

    fill: none;

    stroke: currentColor;
    stroke-width: 1.8;

    stroke-linecap: round;
    stroke-linejoin: round;
}


.aimee-os-ai-development-note {
    margin: 10px 0 0;

    color: #999999;

    font-size: 11px;
    line-height: 1.4;

    text-align: center;
}


/* ---------------------------------
   BuildBrief
---------------------------------- */

.aimee-os-question {
    margin: 20px 0 14px;
}


.aimee-os-question p {
    margin: 0 0 7px;

    color: #444444;

    font-size: 15px;
    line-height: 1.5;
}


.aimee-os-question strong {
    color: #191919;

    font-size: 16px;
}


.aimee-os-options {
    display: flex;

    flex-wrap: wrap;

    margin: -6px;
}


.aimee-os-options button {
    display: flex;
    align-items: center;

    width:
        calc(50% - 12px);

    min-height: 66px;

    margin: 6px;
    padding: 14px 16px;

    border: 1px solid #e5e5e5;
    border-radius: 13px;

    background: #fafafa;

    color: #252525;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;

    text-align: left;

    cursor: pointer;
}


.aimee-os-options button:hover {
    border-color: var(--aimee-accent);

    background: #ffffff;
}


.aimee-os-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 39px;
    height: 39px;

    margin-right: 12px;

    border-radius: 10px;

    background: #ffffff;

    color: var(--aimee-accent);
}


.aimee-os-icon svg {
    width: 21px;
    height: 21px;

    fill: none;

    stroke: currentColor;
    stroke-width: 1.8;

    stroke-linecap: round;
    stroke-linejoin: round;
}


/* ---------------------------------
   BuildBrief Navigation
---------------------------------- */

.aimee-os-navigation {
    margin-top: 18px;
}


.aimee-os-back-button {
    display: inline-flex;
    align-items: center;

    gap: 5px;

    padding: 9px 13px;

    border: 1px solid #dddddd;
    border-radius: 9px;

    background: #ffffff;

    color: #555555;

    font-family: inherit;

    cursor: pointer;
}


.aimee-os-back-button svg {
    width: 16px;
    height: 16px;

    fill: none;

    stroke: currentColor;
    stroke-width: 2;
}


/* ---------------------------------
   Summary
---------------------------------- */

.aimee-os-summary {
    margin-top: 12px;

    border-top: 1px solid #eeeeee;
}


.aimee-os-summary-row {
    display: flex;
    justify-content: space-between;

    gap: 20px;

    padding: 12px 0;

    border-bottom: 1px solid #eeeeee;
}


.aimee-os-summary-row strong {
    width: 42%;
}


.aimee-os-summary-row span {
    width: 58%;

    color: #666666;

    text-align: right;
}


/* ---------------------------------
   Contact Form
---------------------------------- */

.aimee-os-contact {
    margin-top: 28px;
    padding-top: 25px;

    border-top: 2px solid #eeeeee;
}


.aimee-os-contact h3 {
    margin: 0 0 20px;
}


.aimee-os-contact label {
    display: block;

    margin: 0 0 6px;

    font-size: 13px;
    font-weight: 700;
}


.aimee-os-contact input {
    display: block;

    width: 100%;

    margin: 0 0 15px;
    padding: 12px 13px;

    border: 1px solid #dddddd;
    border-radius: 10px;

    background: #ffffff;

    font: inherit;
}


.aimee-os-contact input:focus {
    border-color: var(--aimee-accent);

    outline:
        2px solid rgba(236, 22, 140, 0.10);
}


.aimee-os-message {
    min-height: 20px;

    color: #c62828;

    font-size: 13px;
}


.aimee-os-submit {
    width: 100%;

    min-height: 52px;

    margin-top: 14px;

    border: 0;
    border-radius: 11px;

    background: var(--aimee-accent);

    color: #ffffff;

    font: inherit;
    font-weight: 700;

    cursor: pointer;
}


.aimee-os-submit:disabled {
    opacity: .6;

    cursor: default;
}


/* ---------------------------------
   Success
---------------------------------- */

.aimee-os-success {
    padding: 35px 10px;

    text-align: center;
}


.aimee-os-success-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 62px;
    height: 62px;

    margin: 0 auto 15px;

    border-radius: 50%;

    background: var(--aimee-accent);

    color: #ffffff;

    font-size: 26px;
    font-weight: 700;
}


/* ---------------------------------
   SHARED FOOTER BRANDING
---------------------------------- */

/*
 * Both the compact launcher and larger assistant
 * now deliberately use exactly the same typography.
 */

.aimee-os-footer,
.aimee-os-menu-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    gap: 5px;

    color: #999999;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif !important;

    font-size: 11px !important;
    font-style: normal !important;
    font-weight: 400 !important;

    line-height: 1.4 !important;

    text-align: center;
}


/*
 * Larger assistant footer spacing.
 */

.aimee-os-footer {
    margin-top: 28px;
    padding-top: 18px;

    border-top: 1px solid #eeeeee;
}


/*
 * Compact launcher footer spacing.
 */

.aimee-os-menu-footer {
    margin: 0;
    padding: 2px 8px 4px;
}


/*
 * "Powered by" remains normal weight in both.
 */

.aimee-os-footer > span,
.aimee-os-menu-footer > span {
    color: #999999 !important;

    font-family: inherit !important;

    font-size: 11px !important;
    font-weight: 400 !important;

    line-height: 1.4 !important;
}


/*
 * Business name has exactly the same weight
 * and size in both versions.
 */

.aimee-os-footer strong,
.aimee-os-menu-footer strong {
    color: #777777 !important;

    font-family: inherit !important;

    font-size: 11px !important;
    font-weight: 700 !important;

    line-height: 1.4 !important;
}


/*
 * AiMee OS link also matches the business
 * name styling.
 */

.aimee-os-footer a,
.aimee-os-menu-footer a {
    color: #777777 !important;

    font-family: inherit !important;

    font-size: 11px !important;
    font-weight: 700 !important;

    line-height: 1.4 !important;

    text-decoration: none !important;
}


.aimee-os-footer a:hover,
.aimee-os-menu-footer a:hover {
    color: var(--aimee-accent, #ec168c) !important;

    text-decoration: underline !important;
}


/*
 * Logo remains slightly smaller in the compact
 * launcher because the launcher itself is narrower,
 * but the text remains identical.
 */

.aimee-os-footer-logo {
    display: inline-block !important;

    width: auto !important;
    height: auto !important;

    max-width: 90px !important;
    max-height: 24px !important;

    margin: 0 !important;
    padding: 0 !important;

    object-fit: contain !important;
}


.aimee-os-menu-footer
.aimee-os-footer-logo {
    max-width: 70px !important;
    max-height: 20px !important;
}


/* ---------------------------------
   Floating Launcher
---------------------------------- */

.aimee-os-launcher-wrap {
    position: fixed;

    z-index: 999998;

    display: flex;
    flex-direction: column;

    align-items: flex-end;

    gap: 12px;

    --aimee-launcher-size: 78px;
    --aimee-launcher-colour: #ec168c;
}


.aimee-os-launcher {
    display: flex;
    align-items: center;
    justify-content: center;

    width: var(--aimee-launcher-size);
    height: var(--aimee-launcher-size);

    min-width: var(--aimee-launcher-size);
    min-height: var(--aimee-launcher-size);

    max-width: var(--aimee-launcher-size);
    max-height: var(--aimee-launcher-size);

    padding: 0;

    overflow: hidden;

    border: 3px solid #ffffff;
    border-radius: 50%;

    background: var(--aimee-launcher-colour);

    color: #ffffff;

    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.22);

    cursor: pointer;
}


.aimee-os-launcher-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    overflow: hidden;

    border-radius: 50%;
}


.aimee-os-launcher-icon img {
    display: block !important;

    width: 100% !important;
    height: 100% !important;

    min-width: 100% !important;
    min-height: 100% !important;

    max-width: 100% !important;
    max-height: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    object-fit: cover !important;
    object-position: center !important;

    border-radius: 50% !important;
}


.aimee-os-launcher-icon svg {
    width: 47%;
    height: 47%;

    fill: none;

    stroke: currentColor;
    stroke-width: 1.8;
}


/* ---------------------------------
   Compact Channel Menu
---------------------------------- */

.aimee-os-channel-menu {
    width: 250px;
    min-width: 250px;

    padding: 10px;

    border: 1px solid #eeeeee;

    border-radius: 18px;

    background: #ffffff;

    box-shadow:
        0 12px 38px rgba(0, 0, 0, 0.16);
}


/* ---------------------------------
   Compact Menu Branding
---------------------------------- */

.aimee-os-menu-brand {
    display: flex;
    align-items: center;

    gap: 11px;

    padding: 8px 8px 10px;
}


.aimee-os-menu-avatar {
    display: block;

    flex: 0 0 48px;

    width: 48px;
    height: 48px;

    min-width: 48px;
    min-height: 48px;

    max-width: 48px;
    max-height: 48px;

    overflow: hidden;

    border-radius: 50%;

    background: #f5f5f5;

    line-height: 0;
}


.aimee-os-menu-avatar img {
    display: block !important;

    width: 48px !important;
    height: 48px !important;

    min-width: 48px !important;
    min-height: 48px !important;

    max-width: 48px !important;
    max-height: 48px !important;

    margin: 0 !important;
    padding: 0 !important;

    border-radius: 50% !important;

    object-fit: cover !important;
    object-position: center !important;
}


.aimee-os-menu-brand-copy {
    display: flex;
    flex-direction: column;

    min-width: 0;
}


.aimee-os-menu-label {
    display: block;

    margin-bottom: 2px;

    color: #ec168c;

    font-size: 9px;
    font-weight: 800;

    line-height: 1.2;

    letter-spacing: 1.4px;
}


.aimee-os-menu-title {
    display: block;

    color: #222222;

    font-size: 16px;
    font-weight: 700;

    line-height: 1.25;
}


.aimee-os-menu-divider {
    height: 1px;

    margin: 2px 8px 6px;

    background: #eeeeee;
}


.aimee-os-menu-divider-footer {
    margin-top: 7px;
    margin-bottom: 7px;
}


/* ---------------------------------
   Channel Actions
---------------------------------- */

.aimee-os-channel-action {
    display: flex;
    align-items: center;

    width: 100%;

    gap: 10px;

    padding: 9px 10px;

    border: 0;
    border-radius: 10px;

    background: transparent;

    color: #333333;

    font: inherit;
    font-size: 13px;

    text-decoration: none;

    cursor: pointer;
}


.aimee-os-channel-action:hover {
    background: #f7f7f7;
}


.aimee-os-channel-action > span {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 32px;
    height: 32px;

    border-radius: 8px;

    background: #f7f7f7;

    color: var(--aimee-launcher-colour);
}


.aimee-os-channel-action strong {
    color: #333333;

    font-size: 13px;
    font-weight: 600;
}


.aimee-os-channel-action svg {
    width: 18px;
    height: 18px;

    fill: none;

    stroke: currentColor;
    stroke-width: 1.8;

    stroke-linecap: round;
    stroke-linejoin: round;
}


/* ---------------------------------
   Floating Panel
---------------------------------- */

body.aimee-os-panel-open {
    overflow: hidden;
}


.aimee-os-panel-overlay {
    position: fixed;

    z-index: 999999;

    inset: 0;

    display: flex;
    align-items: flex-end;
    justify-content: flex-end;

    padding: 20px;

    background:
        rgba(0, 0, 0, 0.30);
}


.aimee-os-panel {
    display: flex;
    flex-direction: column;

    width: 470px;

    max-width:
        calc(100vw - 40px);

    max-height:
        calc(100vh - 40px);

    overflow: hidden;

    border-radius: 22px;

    background: #ffffff;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.28);
}


/* ---------------------------------
   Panel Close Bar
---------------------------------- */

.aimee-os-panel-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    flex: 0 0 auto;

    min-height: 48px;

    padding: 8px 12px 5px;

    background: #ffffff;
}


.aimee-os-panel-close {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 34px;

    width: 34px;
    height: 34px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: #f5f5f5;

    color: #333333;

    cursor: pointer;
}


.aimee-os-panel-close:hover {
    background: #eeeeee;
}


.aimee-os-panel-close svg {
    width: 17px;
    height: 17px;

    fill: none;

    stroke: currentColor;
    stroke-width: 2;
}


.aimee-os-panel-body {
    min-width: 0;

    overflow-y: auto;

    overscroll-behavior: contain;

    background: #ffffff;
}


.aimee-os-panel
.aimee-os {
    width: 100%;

    max-width: none;

    margin: 0;
    padding: 0;
}


.aimee-os-panel
.aimee-os-card {
    width: 100%;

    padding: 8px 22px 24px;

    border: 0;
    border-radius: 0;

    box-shadow: none;
}


.aimee-os-panel
.aimee-os-assistant-header {
    align-items: center;

    margin-bottom: 24px;
}


.aimee-os-panel
.aimee-os-title {
    font-size: 24px;
}


.aimee-os-panel
.aimee-os-assistant-header p {
    font-size: 13px;
    line-height: 1.5;
}


.aimee-os-panel
.aimee-os-mode-grid {
    grid-template-columns: 1fr;
}


.aimee-os-panel
.aimee-os-mode-card {
    min-height: 80px;
}


.aimee-os-panel
.aimee-os-options button {
    width:
        calc(100% - 12px);
}


/* ---------------------------------
   Tablet
---------------------------------- */

@media screen and (max-width: 768px) {

    .aimee-os {
        margin: 30px auto;
        padding: 15px;
    }


    .aimee-os-card {
        padding: 30px 25px;
    }
}


/* ---------------------------------
   Mobile
---------------------------------- */

@media screen and (max-width: 600px) {

    .aimee-os {
        margin: 15px auto;
        padding: 10px;
    }


    .aimee-os-card {
        padding: 24px 18px;

        border-radius: 18px;
    }


    .aimee-os-assistant-header {
        align-items: center;

        gap: 14px;
    }


    .aimee-os-title {
        font-size: 24px;
    }


    .aimee-os-mode-grid {
        grid-template-columns: 1fr;
    }


    .aimee-os-options {
        margin: -5px;
    }


    .aimee-os-options button {
        width:
            calc(100% - 10px);

        margin: 5px;
    }


    .aimee-os-summary-row {
        display: block;
    }


    .aimee-os-summary-row strong,
    .aimee-os-summary-row span {
        display: block;

        width: 100%;
    }


    .aimee-os-summary-row span {
        margin-top: 4px;

        text-align: left;
    }


    .aimee-os-chat-bubble {
        max-width: 86%;
    }


    .aimee-os-panel-overlay {
        padding: 0;

        background: #ffffff;
    }


    .aimee-os-panel {
        width: 100vw;

        max-width: none;

        height: 100vh;

        max-height: none;

        border-radius: 0;
    }


    .aimee-os-panel-body {
        flex: 1;
    }


    .aimee-os-panel
    .aimee-os-card {
        padding:
            5px 18px 22px;
    }


    .aimee-os-channel-menu {
        width: 240px;
        min-width: 240px;
    }
}