.ms-search-widget {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: block !important;
    visibility: visible !important;
}

.ms-search-form {
    position: relative;
    background: #fff;
    border-radius: 50px;
    border: 2px solid #eee;
    transition: all 0.3s ease;
}

.ms-search-form:focus-within {
    border-color: var(--gemini-color);
    box-shadow: 0 5px 15px rgba(var(--gemini-color-rgb), 0.1);
}

#ps_meilisearch_form input:focus {
    border-color: var(--gemini-color);
    outline: none;
    box-shadow: 0 0 5px rgba(0,0,0,0.05);
}

.ms-input-group {
    display: flex;
    align-items: center;
    padding: 5px 10px 5px 25px;
}

.ms-search-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    height: 45px;
    font-size: 1rem;
    color: #333;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.ms-search-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 5px;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gemini-color);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ms-search-btn:hover {
    background: color-mix(in srgb, var(--gemini-color) 85%, black);
}

.ms-search-btn i {
    font-size: 20px;
}

/* Autocomplete Styles */
.ms-widget-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    z-index: 999999;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 15px 15px;
    margin-top: 10px;
    border: 1px solid #f0f0f0;
    display: none;
    max-height: 500px;
    overflow-y: auto;
}

.ms-widget-autocomplete.visible {
    display: block;
}

.ms-ac-header {
    padding: 10px 15px;
    font-weight: 600;
    font-size: 14px;
    background: var(--gemini-color);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.ms-ac-count {
    background: var(--gemini-color);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
}

.ms-ac-row {
    display: flex !important;
    align-items: center !important;
    padding: 15px 20px !important;
    text-decoration: none !important;
    color: #333 !important;
    border-bottom: 1px solid #f8f8f8 !important;
    transition: background 0.2s !important;
}

.ms-ac-row:hover {
    background: var(--gemini-color-light) !important;
}

.ms-ac-item.active {
    background: var(--gemini-color-light) !important;
}

.ms-ac-img-cont {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    margin-right: 15px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ms-ac-img-cont img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.ms-ac-details {
    flex: 1;
    min-width: 0;
}

.ms-ac-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0 0 3px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ms-ac-price {
    color: var(--gemini-color);
    font-weight: 700;
    font-size: 0.9rem;
}

/* Meilisearch keyword highlights */
.ms-ac-title em,
.ms-ac-details em,
.ms-product-name em {
    font-style: normal;
    font-weight: 700;
    color: var(--gemini-color);
}

.ms-ac-footer {
    padding: 15px;
    text-align: center;
    background: #fdfdfd;
}

.ms-ac-all-btn {
    display: block;
    text-align: center;
    padding: 12px;
    background: var(--gemini-color-light);
    color: var(--gemini-color);
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    transition: background 0.3s;
}

.ms-ac-all-btn:hover {
    background: color-mix(in srgb, var(--gemini-color) 25%, white);
}

@media (max-width: 768px) {
    .ms-search-widget {
        max-width: 100%;
    }

    .ms-input-group {
        padding: 3px 8px 3px 15px;
    }

    .ms-widget-autocomplete {
        max-height: 400px;
    }

    .ms-ac-row {
        padding: 10px 15px !important;
    }
}

@media (max-width: 480px) {
    .ms-search-input {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
    }

    .ms-search-btn {
        width: 36px;
        height: 36px;
    }

    .ms-widget-autocomplete {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        max-height: 100dvh !important;
        border-radius: 0;
        margin-top: 0;
        z-index: 9999999;
    }

    .ms-ac-row {
        padding: 12px !important;
        gap: 10px;
    }

    .ms-ac-img-cont {
        width: 42px;
        height: 42px;
        margin-right: 10px;
    }

    .ms-ac-title {
        font-size: 0.85rem;
        white-space: normal;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        display: -webkit-box;
        overflow: hidden;
    }

    .ms-ac-footer {
        position: sticky;
        bottom: 0;
        background: #fff;
        border-top: 1px solid #eee;
        padding: 10px;
    }

    .ms-ac-all-btn {
        padding: 14px;
        font-size: 0.95rem;
    }
}

/* ==========================================================================
   Gemini Assistant Floating Widget
   ========================================================================== */

#ps-gemini-assistant {
    position: fixed;
    z-index: 999999;
    font-family: inherit;
    bottom: 30px;
    width: 60px;
    height: 60px;
}

#ps-gemini-assistant.ps-gemini-position-right {
    right: 30px;
}

#ps-gemini-assistant.ps-gemini-position-left {
    left: 30px;
}

/* Launcher Button */
#ps-gemini-launcher {
    width: 60px;
    height: 60px;
    background: var(--gemini-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15), 0 10px 25px rgba(var(--gemini-color), 0.2);
    cursor: grab;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
}

#ps-gemini-launcher:hover {
    transform: scale(1.05);
}

#ps-gemini-launcher:active {
    cursor: grabbing;
}

/* Chat Window */
#ps-gemini-chat-window {
    width: 380px;
    height: 600px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1), 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: absolute;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), visibility 0.3s;
    visibility: visible;
}

/* Base Quadrant (Bottom-Right default) */
#ps-gemini-assistant.q-br #ps-gemini-chat-window,
#ps-gemini-assistant:not(.q-tl):not(.q-tr):not(.q-bl):not(.q-br) #ps-gemini-chat-window {
    bottom: 70px;
    right: 0;
    top: auto;
    left: auto;
    transform-origin: bottom right;
}

#ps-gemini-assistant.q-bl #ps-gemini-chat-window,
#ps-gemini-assistant.ps-gemini-position-left:not(.q-tl):not(.q-tr):not(.q-bl):not(.q-br) #ps-gemini-chat-window {
    bottom: 70px;
    left: 0;
    top: auto;
    right: auto;
    transform-origin: bottom left;
}

#ps-gemini-assistant.q-tr #ps-gemini-chat-window {
    top: 70px;
    right: 0;
    bottom: auto;
    left: auto;
    transform-origin: top right;
}

#ps-gemini-assistant.q-tl #ps-gemini-chat-window {
    top: 70px;
    left: 0;
    bottom: auto;
    right: auto;
    transform-origin: top left;
}


/* Closed State */
#ps-gemini-assistant.ps-gemini-closed #ps-gemini-chat-window {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9);
    pointer-events: none;
}

#ps-gemini-assistant.ps-gemini-closed #ps-gemini-launcher svg {
    animation: none;
}

/* Header */
.ps-gemini-chat-header {
    background: var(--gemini-color);
    color: #fff;
    padding: 24px 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-radius: 20px 20px 0 0;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15px), 50% 100%, 0 calc(100% - 15px));
}

/* Flat bottom for right align edge */
.ps-gemini-position-right .ps-gemini-chat-header {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 15px));
}

.ps-gemini-position-left .ps-gemini-chat-header {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15px), 0 100%);
}

.ps-gemini-header-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ps-gemini-avatar {
    width: 45px;
    height: 45px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gemini-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.ps-gemini-title-group {
    display: flex;
    flex-direction: column;
}

.ps-gemini-chat-title {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.ps-gemini-chat-subtitle {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ps-gemini-chat-subtitle::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.3);
}

.ps-gemini-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

#ps-gemini-chat-close, #ps-gemini-chat-minimize {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

#ps-gemini-chat-close:hover, #ps-gemini-chat-minimize:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

/* Output Area */
#ps-gemini-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #fdfdfd;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

/* Scrollbar */
#ps-gemini-chat-messages::-webkit-scrollbar {
    width: 6px;
}
#ps-gemini-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}
#ps-gemini-chat-messages::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 10px;
}
#ps-gemini-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #d0d0d0;
}

/* Bubbles */
.ps-gemini-msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.4;
    animation: psGeminiPopIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform-origin: bottom center;
}

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

.ps-gemini-msg-user {
    align-self: flex-end;
    background: var(--gemini-color);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.ps-gemini-msg-bot {
    align-self: flex-start;
    background: #ffffff;
    border: 1px solid #f0f0f0;
    color: var(--gemini-text);
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.ps-gemini-msg-bot strong {
    color: #111;
}

.ps-gemini-msg-bot a {
    color: var(--gemini-color);
    text-decoration: underline;
}

/* Typing Indicator */
.ps-gemini-typing {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 4px 6px;
}
.ps-gemini-typing span {
    width: 6px;
    height: 6px;
    background: #ccc;
    border-radius: 50%;
    animation: psGeminiBlink 1.4s infinite both;
}
.ps-gemini-typing span:nth-child(2) { animation-delay: 0.2s; }
.ps-gemini-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes psGeminiBlink {
    0%, 100% { opacity: 0.2; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Input Area */
.ps-gemini-chat-input-container {
    background: #fff;
    padding: 10px 15px;
    border-top: 1px solid #f0f0f0;
    border-radius: 0 0 20px 20px;
}

#ps-gemini-chat-form {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f9f9f9;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #eee;
}

#ps-gemini-chat-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 8px 0 !important;
    font-size: 0.95rem;
    color: var(--gemini-text);
    outline: none !important;
}

#ps-gemini-chat-input::placeholder {
    color: #aaa;
}

.ps-gemini-input-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.ps-gemini-action-btn, #ps-gemini-chat-submit {
    background: transparent;
    border: none;
    color: #a0a0a0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    cursor: pointer;
}

#ps-gemini-chat-submit {
    background: var(--gemini-color);
    color: #fff;
    box-shadow: 0 4px 10px rgba(var(--gemini-color), 0.2);
}

#ps-gemini-chat-submit svg {
    transform: translate(-1px, 1px);
}

#ps-gemini-chat-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(var(--gemini-color), 0.3);
}

#ps-gemini-chat-submit:disabled, .ps-gemini-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f0f0f0;
    color: #aaa;
    box-shadow: none;
    transform: none;
}

.ps-gemini-powered-by {
    text-align: center;
    font-size: 0.7rem;
    color: #bbb;
    margin-top: 12px;
}

.ps-gemini-powered-by a {
    color: #999;
    font-weight: 600;
    text-decoration: none;
}

.ps-gemini-powered-by a:hover {
    color: var(--gemini-color);
}

/* Product Cards within Chat */
.ps-gemini-product-mini {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 8px;
    margin: 8px 0;
    gap: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.ps-gemini-product-mini:hover {
    transform: translateY(-2px);
    border-color: var(--gemini-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.ps-gemini-product-img-cont {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 8px;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ps-gemini-product-img-cont img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.ps-gemini-product-mini-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ps-gemini-product-mini-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gemini-text);
    text-decoration: none;
    line-height: 1.2;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ps-gemini-product-mini-title:hover {
    color: var(--gemini-color);
}

.ps-gemini-product-mini-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gemini-color);
}

.ps-gemini-product-mini-action .add-to-cart {
    background: var(--gemini-color);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    padding: 0;
}

.ps-gemini-product-mini-action .add-to-cart .ps-cart-icon {
    font-size: 16px;
    line-height: 1;
    filter: grayscale(1) brightness(10);
}

.ps-gemini-product-mini-action .add-to-cart:hover {
    filter: brightness(1.1);
}

/* ===== RESPONSIVE: Tablet (481px – 768px) ===== */
@media (max-width: 768px) {
    #ps-gemini-chat-window {
        width: 340px;
        height: 520px;
        max-height: calc(100dvh - 100px);
    }

    #ps-gemini-launcher {
        width: 52px;
        height: 52px;
    }

    #ps-gemini-assistant {
        bottom: 20px;
    }

    #ps-gemini-assistant.ps-gemini-position-right {
        right: 20px;
    }

    #ps-gemini-assistant.ps-gemini-position-left {
        left: 20px;
    }

    .ps-gemini-chat-header {
        padding: 18px 16px 24px;
    }

    .ps-gemini-avatar {
        width: 38px;
        height: 38px;
    }

    .ps-gemini-avatar svg {
        width: 18px;
        height: 18px;
    }

    .ps-gemini-chat-title {
        font-size: 1rem;
    }

    #ps-gemini-chat-messages {
        padding: 14px;
        gap: 12px;
    }

    .ps-gemini-msg {
        max-width: 90%;
        font-size: 0.9rem;
    }
}

/* ===== RESPONSIVE: Mobile (≤480px) — Near fullscreen overlay ===== */
@media (max-width: 480px) {
    /* Container: reset to fill screen bottom area */
    #ps-gemini-assistant {
        bottom: 15px !important;
        top: auto !important;
    }

    #ps-gemini-assistant.ps-gemini-position-right {
        right: 15px !important;
    }

    #ps-gemini-assistant.ps-gemini-position-left {
        left: 15px !important;
    }

    /* Launcher: smaller for mobile */
    #ps-gemini-launcher {
        width: 50px;
        height: 50px;
    }

    #ps-gemini-launcher svg {
        width: 22px;
        height: 22px;
    }

    /* Chat window: near-fullscreen overlay */
    #ps-gemini-chat-window {
        position: fixed !important;
        top: 10px !important;
        left: 8px !important;
        right: 8px !important;
        bottom: 8px !important;
        width: calc(100vw - 16px) !important;
        height: calc(100dvh - 18px) !important;
        max-height: none !important;
        border-radius: 16px;
        z-index: 1000;
    }

    /* Override all quadrant positioning on mobile */
    #ps-gemini-assistant.q-br #ps-gemini-chat-window,
    #ps-gemini-assistant.q-bl #ps-gemini-chat-window,
    #ps-gemini-assistant.q-tr #ps-gemini-chat-window,
    #ps-gemini-assistant.q-tl #ps-gemini-chat-window,
    #ps-gemini-assistant:not(.q-tl):not(.q-tr):not(.q-bl):not(.q-br) #ps-gemini-chat-window,
    #ps-gemini-assistant.ps-gemini-position-left:not(.q-tl):not(.q-tr):not(.q-bl):not(.q-br) #ps-gemini-chat-window {
        position: fixed !important;
        top: 10px !important;
        left: 8px !important;
        right: 8px !important;
        bottom: 8px !important;
        width: calc(100vw - 16px) !important;
        height: calc(100dvh - 18px) !important;
        max-height: none !important;
        transform-origin: bottom center;
    }

    /* Header: compact */
    .ps-gemini-chat-header {
        padding: 16px 14px 22px;
        border-radius: 16px 16px 0 0;
        clip-path: none !important;
    }

    .ps-gemini-header-content {
        gap: 10px;
    }

    .ps-gemini-avatar {
        width: 36px;
        height: 36px;
    }

    .ps-gemini-avatar svg {
        width: 16px;
        height: 16px;
    }

    .ps-gemini-chat-title {
        font-size: 0.95rem;
    }

    .ps-gemini-chat-subtitle {
        font-size: 0.75rem;
    }

    .ps-gemini-header-actions {
        gap: 4px;
    }

    #ps-gemini-chat-close,
    #ps-gemini-chat-minimize {
        padding: 8px;
    }

    /* Messages area: fill available space */
    #ps-gemini-chat-messages {
        padding: 12px;
        gap: 10px;
        flex: 1;
        min-height: 0;
    }

    .ps-gemini-msg {
        max-width: 92%;
        padding: 10px 14px;
        font-size: 0.9rem;
        border-radius: 16px;
    }

    .ps-gemini-msg-user {
        border-bottom-right-radius: 4px;
    }

    .ps-gemini-msg-bot {
        border-bottom-left-radius: 4px;
    }

    /* Input: larger touch targets */
    .ps-gemini-chat-input-container {
        padding: 8px 10px;
        border-radius: 0 0 16px 16px;
    }

    #ps-gemini-chat-form {
        padding: 6px 10px;
    }

    #ps-gemini-chat-input {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
        padding: 10px 0 !important;
    }

    #ps-gemini-chat-submit,
    .ps-gemini-action-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    /* Product cards: adapt to narrow space */
    .ps-gemini-product-mini {
        padding: 6px;
        gap: 8px;
        border-radius: 10px;
    }

    .ps-gemini-product-img-cont {
        width: 44px;
        height: 44px;
        border-radius: 6px;
    }

    .ps-gemini-product-mini-title {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
    }

    .ps-gemini-product-mini-price {
        font-size: 0.85rem;
    }

    .ps-gemini-product-mini-action .add-to-cart {
        width: 30px;
        height: 30px;
        border-radius: 6px;
    }

    /* Disable hover effects on touch devices */
    .ps-gemini-product-mini:hover {
        transform: none;
    }

    #ps-gemini-launcher:hover {
        transform: none;
    }

    #ps-gemini-chat-submit:hover:not(:disabled) {
        transform: none;
    }
}

/* ===== Touch device: disable drag cursor ===== */
@media (hover: none) and (pointer: coarse) {
    #ps-gemini-launcher {
        cursor: pointer;
    }

    #ps-gemini-launcher:active {
        cursor: pointer;
    }
}

/* ==========================================================================
   VISUAL STYLE VARIANTS
   Each component (search, chat-btn, chat-win) can be styled independently.
   "pill" is the default — no overrides needed.
   Activated via body class: ms-search-{style}, ms-chat-btn-{style}, ms-chat-win-{style}
   ========================================================================== */

/* ===== SEARCH BAR: Flat ===== */
body.ms-search-flat .ms-search-form {
    border-radius: 0;
    border: none;
    border-bottom: 2px solid #ddd;
    background: transparent;
    box-shadow: none;
}

body.ms-search-flat .ms-search-form:focus-within {
    border-bottom-color: var(--gemini-color);
    box-shadow: 0 2px 0 var(--gemini-color);
}

body.ms-search-flat .ms-search-btn {
    border-radius: 4px;
    right: 0;
}

body.ms-search-flat .ms-widget-autocomplete {
    border-radius: 0;
    margin-top: 0;
    border-top: none;
}

body.ms-search-flat .ms-ac-header {
    border-radius: 0;
}

/* ===== SEARCH BAR: Glass ===== */
body.ms-search-glass .ms-search-form {
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

body.ms-search-glass .ms-search-form:focus-within {
    background: rgba(255, 255, 255, 0.75);
    border-color: var(--gemini-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

body.ms-search-glass .ms-search-btn {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--gemini-color);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

body.ms-search-glass .ms-search-btn:hover {
    background: var(--gemini-color);
    color: #fff;
}

body.ms-search-glass .ms-widget-autocomplete {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 0 0 20px 20px;
}

body.ms-search-glass .ms-ac-header {
    background: rgba(255, 255, 255, 0.3);
    color: var(--gemini-color);
}

body.ms-search-glass .ms-ac-row:hover {
    background: rgba(255, 255, 255, 0.4) !important;
}

/* ===== SEARCH BAR: Minimal ===== */
body.ms-search-minimal .ms-search-form {
    border: none;
    border-radius: 0;
    border-bottom: 1px solid #ccc;
    background: transparent;
    box-shadow: none;
}

body.ms-search-minimal .ms-search-form:focus-within {
    border-bottom-color: var(--gemini-color);
    box-shadow: none;
}

body.ms-search-minimal .ms-input-group {
    padding: 0 5px;
}

body.ms-search-minimal .ms-search-input {
    height: 38px;
    font-size: 0.95rem;
}

body.ms-search-minimal .ms-search-btn {
    background: transparent;
    color: #888;
    box-shadow: none;
    width: 32px;
    height: 32px;
}

body.ms-search-minimal .ms-search-btn:hover {
    color: var(--gemini-color);
    background: transparent;
}

body.ms-search-minimal .ms-widget-autocomplete {
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
    margin-top: 2px;
}

body.ms-search-minimal .ms-ac-header {
    background: #f8f8f8;
    color: #555;
    font-size: 11px;
}

/* ===== SEARCH BAR: Square ===== */
body.ms-search-square .ms-search-form {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

body.ms-search-square .ms-search-form:focus-within {
    border-color: var(--gemini-color);
}

body.ms-search-square .ms-search-btn {
    border-radius: 6px;
}

body.ms-search-square .ms-widget-autocomplete {
    border-radius: 0 0 8px 8px;
}

body.ms-search-square .ms-ac-header {
    border-radius: 0;
}

/* ===== CHAT BUTTON: Flat ===== */
body.ms-chat-btn-flat #ps-gemini-launcher {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* ===== CHAT BUTTON: Glass ===== */
body.ms-chat-btn-glass #ps-gemini-launcher {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: var(--gemini-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

body.ms-chat-btn-glass #ps-gemini-launcher:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ===== CHAT BUTTON: Minimal ===== */
body.ms-chat-btn-minimal #ps-gemini-launcher {
    background: transparent;
    border: 2px solid var(--gemini-color);
    color: var(--gemini-color);
    box-shadow: none;
}

body.ms-chat-btn-minimal #ps-gemini-launcher:hover {
    background: var(--gemini-color);
    color: #fff;
}

/* ===== CHAT BUTTON: Square ===== */
body.ms-chat-btn-square #ps-gemini-launcher {
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

/* ===== CHAT WINDOW: Flat ===== */
body.ms-chat-win-flat #ps-gemini-chat-window {
    border-radius: 0;
    box-shadow: 0 0 0 1px #e0e0e0, 0 4px 20px rgba(0, 0, 0, 0.1);
}

body.ms-chat-win-flat .ps-gemini-chat-header {
    border-radius: 0;
    clip-path: none;
}

body.ms-chat-win-flat .ps-gemini-chat-input-container {
    border-radius: 0;
}

body.ms-chat-win-flat .ps-gemini-msg {
    border-radius: 4px;
}

body.ms-chat-win-flat #ps-gemini-chat-form {
    border-radius: 4px;
}

/* ===== CHAT WINDOW: Glass ===== */
body.ms-chat-win-glass #ps-gemini-chat-window {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

body.ms-chat-win-glass .ps-gemini-chat-header {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    clip-path: none;
    border-radius: 24px 24px 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--gemini-color);
}

body.ms-chat-win-glass .ps-gemini-chat-header button {
    color: var(--gemini-color);
}

body.ms-chat-win-glass #ps-gemini-chat-messages {
    background: transparent;
}

body.ms-chat-win-glass .ps-gemini-msg-bot {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

body.ms-chat-win-glass .ps-gemini-msg-user {
    background: var(--gemini-color);
    color: #fff;
}

body.ms-chat-win-glass .ps-gemini-chat-input-container {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 0 0 24px 24px;
}

/* ===== CHAT WINDOW: Minimal ===== */
body.ms-chat-win-minimal #ps-gemini-chat-window {
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
}

body.ms-chat-win-minimal .ps-gemini-chat-header {
    background: #fff;
    color: var(--gemini-color);
    border-bottom: 1px solid #eee;
    clip-path: none;
    padding: 16px 16px 16px;
    border-radius: 8px 8px 0 0;
}

body.ms-chat-win-minimal .ps-gemini-chat-header button {
    color: #999;
}

body.ms-chat-win-minimal .ps-gemini-chat-header button:hover {
    color: var(--gemini-color);
}

body.ms-chat-win-minimal .ps-gemini-avatar {
    background: var(--gemini-color-light);
}

body.ms-chat-win-minimal .ps-gemini-avatar svg {
    stroke: var(--gemini-color);
}

body.ms-chat-win-minimal .ps-gemini-msg {
    border-radius: 8px;
    box-shadow: none;
}

body.ms-chat-win-minimal .ps-gemini-msg-bot {
    background: #f5f5f5;
}

body.ms-chat-win-minimal .ps-gemini-chat-input-container {
    border-radius: 0 0 8px 8px;
    border-top: 1px solid #eee;
}

body.ms-chat-win-minimal #ps-gemini-chat-form {
    border-radius: 6px;
}

/* ===== CHAT WINDOW: Square ===== */
body.ms-chat-win-square #ps-gemini-chat-window {
    border-radius: 10px;
}

body.ms-chat-win-square .ps-gemini-chat-header {
    border-radius: 10px 10px 0 0;
    clip-path: none;
}

body.ms-chat-win-square .ps-gemini-msg {
    border-radius: 8px;
}

body.ms-chat-win-square .ps-gemini-chat-input-container {
    border-radius: 0 0 10px 10px;
}

body.ms-chat-win-square #ps-gemini-chat-form {
    border-radius: 8px;
}