.sg-chat-bubble {
	position: fixed;
	bottom: 30px;
	right: 30px;
	width: 75px;
	height: 75px;
	background: #0073aa;
	border-radius: 50%;
	cursor: pointer;
	box-shadow: 0 4px 15px rgba(0,0,0,0.25);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 38px;
	z-index: 9999;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sg-chat-bubble:hover {
    transform: scale(1.1);
}

.sg-chat-container {
	position: fixed;
	bottom: 120px;
	right: 30px;
	width: 500px;
	max-width: 90vw;
	height: 800px;
	max-height: 85vh;
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 10px 40px rgba(0,0,0,0.15);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    border: 1px solid rgba(0,0,0,0.05);
}

.sg-chat-header {
	background: #0073aa;
	color: #fff;
	padding: 24px 30px;
	font-weight: 600;
    font-size: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sg-chat-messages {
	flex: 1;
	padding: 25px;
	overflow-y: auto;
    overflow-x: hidden;
	background: #fdfdfd;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sg-chat-message {
	padding: 14px 20px;
	border-radius: 18px;
	max-width: 85%;
    line-height: 1.6;
    font-size: 16px;
    position: relative;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Bot messages that contain a product carousel get full width */
.sg-chat-message.bot.sg-has-products {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    align-self: stretch;
}

.sg-chat-message.user {
	background: #0073aa;
	color: #fff;
	align-self: flex-end;
	margin-left: auto;
    border-bottom-right-radius: 2px;
    animation: sg-fade-in-right 0.3s ease-out;
}

@keyframes sg-fade-in-right {
    from { opacity: 0; transform: translateX(5px); }
    to { opacity: 1; transform: translateX(0); }
}

.sg-chat-message.bot {
	background: #fff;
	color: #333;
	align-self: flex-start;
    border: 1px solid #eee;
    border-bottom-left-radius: 2px;
    animation: sg-fade-in 0.3s ease-out;
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
}

@keyframes sg-fade-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.sg-chat-input-area {
	padding: 20px 30px;
	border-top: 1px solid #eee;
	display: flex;
    align-items: center;
    background: #fff;
}

.sg-chat-input-area input {
	flex: 1;
	border: 1px solid #e0e0e0;
	padding: 14px 20px;
	border-radius: 30px;
	outline: none;
    font-size: 16px;
    transition: border-color 0.2s;
}

.sg-chat-input-area input:focus {
    border-color: #0073aa;
}

.sg-chat-input-area button {
	background: #0073aa;
	color: #fff;
	border: none;
	padding: 12px 25px;
	margin-left: 15px;
	border-radius: 30px;
	cursor: pointer;
    font-weight: 600;
    transition: opacity 0.2s;
}

.sg-chat-input-area button:hover {
    opacity: 0.9;
}

.sg-message-inner {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.sg-bot-avatar {
    width: 32px;
    height: 32px;
    background: #eee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    color: #666;
    flex-shrink: 0;
    border: 1px solid #ddd;
}

.sg-message-text {
    flex: 1;
}

.sg-chat-header::after {
    content: "−";
    cursor: pointer;
    font-size: 22px;
    font-weight: bold;
    opacity: 0.8;
}

.sg-chat-header:hover::after {
    opacity: 1;
}

/* ============================================
   Product Carousel — single card, no overflow
   ============================================ */
.sg-product-carousel-wrapper {
    position: relative;
    width: 100%;
    margin: 12px 0 4px;
    box-sizing: border-box;
}


/*
  sg-product-viewport: position:relative context for the arrows.
  Does NOT clip — arrows sit absolutely inside here so top:50% = card center.
*/
.sg-product-viewport {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/*
  sg-product-clip: actually clips card content so nothing overflows horizontally.
  This inner wrapper has overflow:hidden.
*/
.sg-product-clip {
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    box-sizing: border-box;
}

/* Slide-in animations */
@keyframes sg-slide-from-right {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes sg-slide-from-left {
    from { opacity: 0; transform: translateX(-40px); }
    to   { opacity: 1; transform: translateX(0); }
}
.sg-slide-from-right { animation: sg-slide-from-right 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.sg-slide-from-left  { animation: sg-slide-from-left  0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); }

/* Arrow buttons — float above the card edges */
.sg-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 18px;
    line-height: 1;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: background 0.18s, box-shadow 0.18s, transform 0.18s;
    padding: 0;
    user-select: none;
}
.sg-carousel-arrow:hover {
    background: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
    transform: translateY(-50%) scale(1.12);
}
.sg-carousel-arrow:active {
    transform: translateY(-50%) scale(0.92);
}
/* Arrows sit just inside the card edges */
.sg-carousel-arrow.left  { left: 8px; }
.sg-carousel-arrow.right { right: 8px; }
.sg-carousel-arrow:disabled {
    opacity: 0.25;
    cursor: default;
    pointer-events: none;
}

/* Dot indicators */
.sg-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}
.sg-carousel-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ccc;
    transition: background 0.2s, transform 0.2s;
    cursor: pointer;
    border: none;
    padding: 0;
    flex-shrink: 0;
}
.sg-carousel-dot.active {
    background: #0073aa;
    transform: scale(1.3);
}

/* Individual product card */
.sg-product-card {
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.sg-product-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-bottom: 1px solid #f0f0f0;
    display: block;
}

.sg-product-info {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.sg-product-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    color: #222;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sg-product-price {
    font-size: 16px;
    color: #2e7d32;
    font-weight: 700;
    margin-bottom: 12px;
}

.sg-product-button {
    display: block;
    text-align: center;
    background: #0073aa;
    color: #fff !important;
    text-decoration: none !important;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: filter 0.18s;
    margin-top: auto;
    box-sizing: border-box;
}
.sg-product-button:hover {
    filter: brightness(1.12);
}

/* Counter label e.g. "2 / 5" */
.sg-carousel-counter {
    text-align: center;
    font-size: 12px;
    color: #888;
    margin-top: 6px;
    letter-spacing: 0.04em;
}

.sg-message-text-content {
    margin-bottom: 10px;
}

.sg-product-card-simple {
    background: #fdfdfd;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    margin: 5px 0 15px 0;
}

.sg-chat-link {
    color: #0073aa;
    text-decoration: underline;
    font-weight: bold;
}

/* ==========================================================================
   AskGuardian Modern Theme (Homepage Split-Hero Design)
   ========================================================================== */

/* Modern Floating Bubble */
.sg-chat-bubble.sg-theme-modern {
    background: linear-gradient(135deg, #7B5CF0 0%, #1BC8FF 100%) !important;
    box-shadow: 0 8px 30px rgba(123, 92, 240, 0.45), 0 0 20px rgba(27, 200, 255, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.25);
    overflow: visible;
}

.sg-chat-bubble.sg-theme-modern svg {
    color: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.sg-modern-bubble-glow {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(123, 92, 240, 0.5) 0%, transparent 70%);
    pointer-events: none;
    animation: sg-pulse-glow 3s infinite alternate;
}

.sg-modern-bubble-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #36cc72;
    border: 2.5px solid #0d0d1a;
    box-shadow: 0 0 8px #36cc72;
    animation: sg-blink-dot 1.8s infinite;
}

@keyframes sg-pulse-glow {
    from { transform: scale(0.95); opacity: 0.5; }
    to   { transform: scale(1.15); opacity: 0.85; }
}

@keyframes sg-blink-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(0.9); }
}

/* Modern Chat Window Container */
.sg-chat-container.sg-theme-modern {
    background: rgba(13, 13, 26, 0.94) !important;
    backdrop-filter: blur(28px) !important;
    -webkit-backdrop-filter: blur(28px) !important;
    border: 1px solid rgba(123, 92, 240, 0.35) !important;
    border-radius: 24px !important;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.75), 0 0 45px rgba(123, 92, 240, 0.25) !important;
    color: #ffffff;
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    width: 440px;
    max-width: calc(100vw - 32px);
    height: 680px;
    max-height: 84vh;
}

/* Modern Header */
.sg-modern-header {
    background: rgba(255, 255, 255, 0.03) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: none;
}

.sg-modern-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sg-modern-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7B5CF0, #1BC8FF);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 0 16px rgba(123, 92, 240, 0.5);
    flex-shrink: 0;
}

.sg-online-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #36cc72;
    border: 2px solid #0d0d1a;
    box-shadow: 0 0 6px #36cc72;
}

.sg-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sg-agent-title {
    font-weight: 700;
    font-size: 16px;
    color: #ffffff;
    line-height: 1.2;
}

.sg-agent-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 7px;
    border-radius: 99px;
    background: rgba(123, 92, 240, 0.25);
    color: #a78bfa;
    border: 1px solid rgba(123, 92, 240, 0.4);
}

.sg-agent-status {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2px;
}

.sg-modern-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sg-header-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sg-hdot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    opacity: 0.8;
}

.sg-hdot.red {
    background: #ff5f56;
    cursor: pointer;
    transition: transform 0.15s;
}
.sg-hdot.red:hover {
    transform: scale(1.2);
}

.sg-hdot.yellow { background: #ffbd2e; }
.sg-hdot.green  { background: #27c93f; }

.sg-modern-close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.15s;
}

.sg-modern-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Modern Messages Area */
.sg-chat-messages.sg-theme-modern {
    background: radial-gradient(ellipse at top right, rgba(123, 92, 240, 0.12) 0%, transparent 60%), rgba(7, 7, 15, 0.85) !important;
    padding: 20px 18px !important;
    gap: 16px;
}

/* Bot Message */
.sg-chat-container.sg-theme-modern .sg-chat-message.bot {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px 16px 16px 4px !important;
    color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
    font-size: 14.5px;
    line-height: 1.55;
}

.sg-chat-container.sg-theme-modern .sg-bot-avatar {
    background: rgba(123, 92, 240, 0.2) !important;
    border: 1px solid rgba(123, 92, 240, 0.4) !important;
    color: #a78bfa !important;
}

/* User Message */
.sg-chat-container.sg-theme-modern .sg-chat-message.user {
    background: linear-gradient(135deg, #7B5CF0 0%, #6236ff 100%) !important;
    border: none !important;
    border-radius: 16px 16px 4px 16px !important;
    color: #ffffff !important;
    box-shadow: 0 4px 18px rgba(98, 54, 255, 0.35) !important;
    font-size: 14.5px;
    line-height: 1.55;
}

/* Modern Product Card */
.sg-product-card.sg-theme-modern {
    background: rgba(7, 7, 15, 0.75) !important;
    border: 1px solid rgba(123, 92, 240, 0.35) !important;
    border-radius: 14px !important;
    padding: 12px !important;
    margin-top: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
    box-sizing: border-box;
}

.sg-modern-card-badge {
    align-self: flex-start;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #1BC8FF;
    background: rgba(27, 200, 255, 0.15);
    border: 1px solid rgba(27, 200, 255, 0.3);
    padding: 2px 8px;
    border-radius: 99px;
    margin-bottom: 8px;
    letter-spacing: 0.04em;
    display: inline-block;
}

.sg-modern-card-content {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.sg-modern-product-image {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.sg-modern-product-thumb-fallback {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.sg-modern-product-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.sg-modern-product-title {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sg-modern-product-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.sg-modern-product-price {
    font-weight: 800;
    color: #36cc72;
    font-size: 15px;
}

.sg-modern-rating {
    color: #ffbd2e;
    font-size: 12px;
    font-weight: 600;
}

.sg-modern-product-btn {
    width: 100%;
    padding: 9px 14px;
    background: rgba(123, 92, 240, 0.25);
    border: 1px solid rgba(123, 92, 240, 0.45);
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.sg-modern-product-btn:hover {
    background: #7B5CF0 !important;
    border-color: #7B5CF0 !important;
    box-shadow: 0 0 16px rgba(123, 92, 240, 0.5);
    transform: translateY(-1px);
}

.sg-modern-product-btn .sg-arrow {
    transition: transform 0.15s;
}
.sg-modern-product-btn:hover .sg-arrow {
    transform: translateX(3px);
}

/* Suggestion Chips in Modern Theme */
.sg-modern-suggestions {
    display: flex;
    gap: 8px;
    padding: 0 18px 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.sg-modern-suggestions::-webkit-scrollbar { display: none; }

.sg-modern-chip {
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 99px;
    padding: 6px 13px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.18s;
}

.sg-modern-chip:hover {
    background: rgba(123, 92, 240, 0.2);
    border-color: rgba(123, 92, 240, 0.45);
    color: #ffffff;
}

/* Modern Typing Indicator */
.sg-modern-typing-row {
    padding: 10px 14px !important;
}

.sg-modern-typing {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 6px;
}

.sg-tdot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #7B5CF0;
    box-shadow: 0 0 6px #7B5CF0;
    animation: sg-type-bounce 1.4s infinite ease-in-out both;
}

.sg-tdot:nth-child(1) { animation-delay: -0.32s; }
.sg-tdot:nth-child(2) { animation-delay: -0.16s; }
.sg-tdot:nth-child(3) { animation-delay: 0s; }

@keyframes sg-type-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40%           { transform: scale(1.15); opacity: 1; }
}

/* Modern Input Area */
.sg-modern-input-area {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: rgba(7, 7, 15, 0.7) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.sg-modern-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 99px !important;
    padding: 12px 18px !important;
    font-size: 14px !important;
    color: #ffffff !important;
    outline: none !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}

.sg-modern-input::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

.sg-modern-input:focus {
    border-color: #7B5CF0 !important;
    box-shadow: 0 0 0 3px rgba(123, 92, 240, 0.25) !important;
}

.sg-modern-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7B5CF0, #1BC8FF);
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s, opacity 0.15s, box-shadow 0.15s;
    box-shadow: 0 0 16px rgba(123, 92, 240, 0.4);
}

.sg-modern-send-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    box-shadow: none;
}

.sg-modern-send-btn:not(:disabled):hover {
    transform: scale(1.08);
    box-shadow: 0 0 22px rgba(123, 92, 240, 0.6);
}


