/* ============================================
   GROVE AI - Main Stylesheet
   Design: Three-panel chat interface
   Stack: CSS3, no preprocessors
   ============================================ */

/* ── CSS Variables ─────────────────────────── */
:root {
    --grove-bg: #FAFAFA;
    --grove-white: #FFFFFF;
    --grove-black: #111827;
    --grove-gray-50: #F9FAFB;
    --grove-gray-100: #F3F4F6;
    --grove-gray-200: #E5E7EB;
    --grove-gray-300: #D1D5DB;
    --grove-gray-400: #9CA3AF;
    --grove-gray-500: #6B7280;
    --grove-gray-600: #4B5563;
    --grove-gray-700: #374151;
    --grove-gray-800: #1F2937;
    --grove-gray-900: #111827;

    --grove-orange: #E8713A;
    --grove-orange-light: #FEF3EC;
    --grove-orange-hover: #D4622E;
    --grove-orange-dark: #C05621;

    --grove-green: #10B981;
    --grove-green-light: #ECFDF5;

    --grove-blue: #3B82F6;
    --grove-red: #EF4444;

    --grove-sidebar-width: 260px;
    --grove-right-width: 300px;

    --grove-radius-sm: 6px;
    --grove-radius-md: 10px;
    --grove-radius-lg: 16px;
    --grove-radius-xl: 20px;

    --grove-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --grove-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --grove-shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1);

    --grove-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --grove-transition: 0.2s ease;
}

/* ── Reset & Base ──────────────────────────── */
.grove-body {
    margin: 0;
    padding: 0;
    font-family: var(--grove-font);
    background: var(--grove-bg);
    color: var(--grove-gray-900);
    overflow: hidden;
    height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ── App Container ─────────────────────────── */
.grove-app {
    display: flex;
    height: 100vh;
    width: 100%;
    background: var(--grove-white);
}

/* ── Desktop Sidebar Collapse ──────────────── */
.grove-sidebar-left {
    transition: width 0.3s ease, min-width 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
}

.grove-sidebar-left.collapsed {
    width: 0;
    min-width: 0;
    border-right: none;
    opacity: 0;
    pointer-events: none;
}

.grove-sidebar-right {
    transition: width 0.3s ease, min-width 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
}

.grove-sidebar-right.collapsed {
    width: 0;
    min-width: 0;
    border-left: none;
    opacity: 0;
    pointer-events: none;
}

/* ============================================
   LEFT SIDEBAR
   ============================================ */
.grove-sidebar-left {
    width: var(--grove-sidebar-width);
    min-width: var(--grove-sidebar-width);
    background: var(--grove-gray-900);
    color: var(--grove-white);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--grove-gray-200);
    z-index: 20;
}

.grove-sidebar-brand {
    padding: 16px 16px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.grove-brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.grove-logo-icon {
    font-size: 24px;
    line-height: 1;
}

.grove-brand-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--grove-white);
    display: block;
    line-height: 1.2;
}

.grove-brand-sub {
    font-size: 11px;
    color: var(--grove-gray-400);
    display: block;
}

/* New Chat Button */
.grove-new-chat-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 12px 0;
    padding: 10px 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--grove-radius-md);
    color: var(--grove-white);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--grove-transition);
    font-family: var(--grove-font);
}

.grove-new-chat-btn:hover {
    background: rgba(255,255,255,0.15);
}

/*Add Background color to active selected conversation history tab*/
.grove-history-item .active {
    background: rgba(255, 255, 255, 0.15);
}
/* History Section */
.grove-history-section {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.grove-history-label {
    display: block;
    padding: 0 16px 8px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--grove-gray-500);
    text-transform: uppercase;
}

.grove-history-list {
    display: flex;
    flex-direction: column;
}

.grove-history-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: background var(--grove-transition);
    border-left: 3px solid transparent;
}

.grove-history-item:hover {
    background: rgba(255,255,255,0.05);
}

.grove-history-item.active {
    background: rgba(232, 113, 58, 0.15);
    border-left-color: var(--grove-orange);
}

.grove-history-item-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--grove-gray-100);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.grove-history-item-date {
    font-size: 11px;
    color: var(--grove-gray-500);
    display: block;
    margin-top: 2px;
}

.grove-history-empty {
    padding: 20px 16px;
    text-align: center;
}

.grove-history-empty p {
    font-size: 12px;
    color: var(--grove-gray-500);
}

/* Sidebar Footer */
.grove-sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.grove-user-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.grove-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--grove-gray-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--grove-gray-300);
    flex-shrink: 0;
}

.grove-user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--grove-gray-200);
    display: block;
}

.grove-auth-link {
    font-size: 11px;
    color: var(--grove-orange);
    text-decoration: none;
    display: block;
}

.grove-auth-link:hover {
    text-decoration: underline;
    cursor: pointer;
}

.grove-user-email {
    font-size: 11px;
    color: var(--grove-gray-400);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grove-user-logged {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.grove-user-logged .grove-user-info {
    flex: 1;
    min-width: 0;  
}
.grove-user-info{
    margin-left:8px;
}
.grove-logout-btn {
    background: none;
    border: none;
    color: var(--grove-gray-400, #9ca3af);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s, background 0.2s;
}

.grove-logout-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* ── Auth Login Popup ──────────────────────── */
.grove-auth-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.grove-auth-overlay.active {
    opacity: 1;
    visibility: visible;
}

.grove-auth-modal-login {
    background: var(--grove-sidebar-bg, #1a1d23);
    border-radius: 12px;
    width: 440px;
    max-width: 95vw;
    max-height: 85vh;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s ease;
}

.grove-auth-overlay.active .grove-auth-modal-login {
    transform: translateY(0) scale(1);
}

.grove-auth-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.grove-auth-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.grove-auth-close {
    background: none;
    border: none;
    color: var(--grove-gray-400, #9ca3af);
    font-size: 22px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}

.grove-auth-close:hover {
    color: #fff;
}

.grove-auth-modal-body-iframe {
    padding: 0;
}

.grove-auth-iframe-wrap {
    position: relative;
    height: 420px;
    overflow: hidden;
}

.grove-auth-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--grove-gray-400, #9ca3af);
    font-size: 14px;
    z-index: 1;
}

.grove-auth-iframe {
    width: 100%;
    height: 100%;
    border: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: #fff;
    border-radius: 0 0 12px 12px;
}

/* Sidebar Overlay (mobile) */
.grove-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 19;
}

.grove-sidebar-overlay.active {
    display: block;
}

/* ============================================
   CENTER CHAT PANEL
   ============================================ */
.grove-chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--grove-white);
    min-width: 0;
    position: relative;
}

/* Chat Header */
.grove-chat-header {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--grove-gray-200);
    min-height: 52px;
    gap: 12px;
    background: var(--grove-white);
    z-index: 5;
}

.grove-menu-toggle {
    display: flex;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--grove-gray-600);
    padding: 4px;
    border-radius: var(--grove-radius-sm);
    transition: background var(--grove-transition);
}

.grove-menu-toggle:hover {
    background: var(--grove-gray-100);
}

.grove-chat-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--grove-gray-700);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.grove-resources-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    background: none;
    border: none;
    border-radius: var(--grove-radius-sm);
    color: var(--grove-gray-600);
    cursor: pointer;
    font-family: var(--grove-font);
    transition: background var(--grove-transition);
}

.grove-resources-toggle:hover {
    background: var(--grove-gray-100);
}

.grove-badge {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 13px 10px !important;
    background: var(--grove-gray-200);
    color: var(--grove-gray-600);
    border-radius: 100% !important;
    font-size: 10px;
    font-weight: 600;
}

.grove-resources-toggle .grove-badge {
    background: var(--grove-orange);
    color: var(--grove-white);
}

/* Messages Area */
.grove-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0 0 20px;
    scroll-behavior: smooth;
}

/* Welcome State */
.grove-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px 20px;
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
}

.grove-welcome-icon {
    font-size: 48px;
    margin-bottom: 16px;
    line-height: 1;
}

.grove-welcome-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--grove-gray-900);
    text-align: center;
    margin-bottom: 8px;
    line-height: 1.3;
}

.grove-welcome-subtitle {
    font-size: 15px;
    color: var(--grove-gray-500);
    text-align: center;
    max-width: 460px;
    margin-bottom: 28px;
    line-height: 1.5;
}

/* Messages */
.grove-message {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
}

.grove-message-assistant {
    background: var(--grove-gray-50);
}

.grove-message-user {
    background: transparent;
}

.grove-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.grove-message-user .grove-message-avatar {
    background: var(--grove-orange-light);
}

.grove-message-content {
    flex: 1;
    min-width: 0;
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--grove-gray-800);
}

.grove-message-content p {
    margin: 0 0 10px;
}

.grove-message-content p:last-child {
    margin-bottom: 0;
}

.grove-message-content strong {
    font-weight: 600;
    color: var(--grove-gray-900);
}

.grove-message-content a {
    color: var(--grove-orange);
    text-decoration: none;
}

.grove-message-content a:hover {
    text-decoration: underline;
}

.grove-message-content code {
    background: var(--grove-gray-100);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'SF Mono', 'Consolas', monospace;
}

.grove-message-content pre {
    background: var(--grove-gray-900);
    color: var(--grove-gray-100);
    padding: 16px;
    border-radius: var(--grove-radius-md);
    overflow-x: auto;
    margin: 10px 0;
}

.grove-message-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.grove-message-content ul, .grove-message-content ol {
    padding-left: 20px;
    margin: 8px 0;
}

.grove-message-content li {
    margin-bottom: 4px;
}

/* Streaming cursor */
.grove-message-content.grove-streaming::after {
    content: '▋';
    display: inline-block;
    color: var(--grove-orange);
    animation: grove-blink 0.6s ease-in-out infinite;
    margin-left: 1px;
    font-weight: 400;
    vertical-align: baseline;
    line-height: 1;
}

@keyframes grove-blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0; }
}

/* System message (auth prompts) */
.grove-message-system {
    max-width: 720px;
    margin: 0 auto;
    padding: 8px 24px;
    width: 100%;
}

.grove-system-bubble {
    background: var(--grove-orange-light);
    border: 1px solid rgba(232,113,58,0.2);
    border-radius: var(--grove-radius-md);
    padding: 16px;
    font-size: 13px;
    color: var(--grove-gray-700);
    text-align: center;
}

.grove-system-bubble a {
    color: #fff;
    font-weight: 500;
    text-decoration: none;
    padding: 12px 18px;
}

.grove-system-bubble a:hover {
    text-decoration: none;
}
.grove-message-system p{
   color:#000;
   margin: 5px auto;
}
#grove-email-submit{
 width:50%;
 margin-auto;
}
#grove-email-form{
width:80%;
margin:auto;
}
#grove-email-form input{
 padding:15px;
 border:none;
}
#grove-note-link{
 color:#E8713A;
padding:0;
}
/* Prompt Cards */
.grove-prompt-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    max-width: 640px;
    margin-top: 4px;
}

.grove-prompt-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    background: var(--grove-white);
    border: 1px solid var(--grove-gray-200);
    border-radius: var(--grove-radius-md);
    text-align: left;
    cursor: pointer;
    font-family: var(--grove-font);
    transition: border-color var(--grove-transition), box-shadow var(--grove-transition);
}

.grove-prompt-card:hover {
    border-color: var(--grove-orange);
    box-shadow: 0 0 0 1px var(--grove-orange);
}

.grove-prompt-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.grove-prompt-text strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--grove-gray-900);
    margin-bottom: 2px;
}

.grove-prompt-text span {
    font-size: 12px;
    color: var(--grove-gray-500);
}

/* Typing Indicator */
.grove-typing {
    padding: 0;
}

.grove-typing-dots {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.grove-typing-dots span {
    width: 8px;
    height: 8px;
    background: var(--grove-gray-400);
    border-radius: 50%;
    animation: grove-bounce 1.4s ease-in-out infinite;
}

.grove-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.grove-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes grove-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Input Area */
.grove-input-area {
    padding: 12px 20px 16px;
    background: var(--grove-white);
    border-top: 1px solid var(--grove-gray-100);
}

.grove-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: var(--grove-gray-50);
    border: 1px solid var(--grove-gray-200);
    border-radius: var(--grove-radius-lg);
    padding: 8px 12px;
    transition: border-color var(--grove-transition), box-shadow var(--grove-transition);
    max-width: 720px;
    margin: 0 auto;
}

.grove-input-wrapper:focus-within {
    border-color: var(--grove-orange);
    box-shadow: 0 0 0 3px rgba(232,113,58,0.1);
}

.grove-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    line-height: 1.5;
    color: var(--grove-gray-900);
    resize: none;
    outline: none;
    font-family: var(--grove-font);
    max-height: 120px;
    min-height: 24px;
    padding: 4px 0;
}

.grove-input::placeholder {
    color: var(--grove-gray-400);
}

.grove-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--grove-gray-300);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--grove-transition);
    flex-shrink: 0;
    color: var(--grove-white);
}

.grove-send-btn:not(:disabled) {
    background: var(--grove-orange);
}

.grove-send-btn:not(:disabled):hover {
    background: var(--grove-orange-hover);
}

.grove-send-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.grove-input-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.grove-footer-text {
    font-size: 11px;
    color: var(--grove-gray-400);
}

.grove-msg-counter {
    font-size: 11px;
    color: var(--grove-orange);
    font-weight: 500;
}

/* ============================================
   RIGHT SIDEBAR
   ============================================ */
.grove-sidebar-right {
    width: var(--grove-right-width);
    min-width: var(--grove-right-width);
    background: var(--grove-white);
    border-left: 1px solid var(--grove-gray-200);
    display: flex;
    flex-direction: column;
    z-index: 15;
}

.grove-right-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--grove-gray-200);
}

.grove-right-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--grove-gray-900);
}

.grove-right-close {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--grove-gray-500);
    padding: 4px;
}

/* Scrollable Content */
.grove-right-content {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

/* Accordion */
.grove-accordion {
    border-bottom: 1px solid var(--grove-gray-100);
}

.grove-accordion-header {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--grove-font);
    transition: background var(--grove-transition);
}

.grove-accordion-header:hover {
    background: var(--grove-gray-50);
}

.grove-accordion-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--grove-gray-900);
    flex: 1;
    text-align: left;
}

.grove-accordion-arrow {
    transition: transform var(--grove-transition);
    color: var(--grove-gray-400);
}

.grove-accordion-header.active .grove-accordion-arrow {
    transform: rotate(180deg);
}

.grove-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.grove-accordion-body.open {
    max-height: 600px;
}

/* Resource Items */
.grove-resource-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    text-decoration: none;
    color: inherit;
    transition: background var(--grove-transition);
    cursor: pointer;
}

.grove-resource-item:hover {
    background: var(--grove-gray-50);
}

.grove-resource-item.highlight {
    /* background: var(--grove-orange-light); */
    /* border-left: 3px solid var(--grove-orange); */
}

.grove-resource-icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.grove-resource-info {
    flex: 1;
    min-width: 0;
}

.grove-resource-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--grove-gray-900);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.grove-resource-desc {
    font-size: 11px;
    color: var(--grove-gray-500);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.grove-resource-arrow {
    color: var(--grove-gray-400);
    flex-shrink: 0;
}

.grove-tag-new {
    font-size: 9px;
    font-weight: 700;
    color: var(--grove-orange);
    background: var(--grove-orange-light);
    padding: 1px 5px;
    border-radius: 3px;
    vertical-align: middle;
    letter-spacing: 0.04em;
}

/* CTA Section */
.grove-cta-section {
    padding: 16px;
    border-top: 1px solid var(--grove-gray-200);
    text-align: center;
}

.grove-cta-button {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: var(--grove-orange);
    color: var(--grove-white);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--grove-radius-lg);
    text-align: center;
    transition: background var(--grove-transition), transform var(--grove-transition);
    font-family: var(--grove-font);
}

.grove-cta-button:hover {
    background: var(--grove-orange-hover);
    transform: translateY(-1px);
    color:#fff;
}

.grove-cta-sub {
    display: block;
    font-size: 11px;
    color: var(--grove-gray-500);
    margin-top: 6px;
}

/* ── Dynamic Tools ─────────────────────────── */
.grove-tools-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    font-size: 12px;
    color: var(--grove-gray-500);
}

.grove-tools-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid var(--grove-gray-200);
    border-top-color: var(--grove-orange);
    border-radius: 50%;
    animation: grove-spin 0.6s linear infinite;
}

@keyframes grove-spin {
    to { transform: rotate(360deg); }
}

.grove-tools-empty {
    padding: 14px 16px;
    font-size: 12px;
    color: var(--grove-gray-400);
}

.grove-tools-label {
    padding: 6px 16px 2px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--grove-orange);
}

.grove-tool-item {
    transition: background var(--grove-transition), border-color var(--grove-transition);
}

.grove-tool-item.highlight {
    animation: grove-tool-fadein 0.3s ease;
}

@keyframes grove-tool-fadein {
    from { opacity: 0; transform: translateX(8px); }
    to   { opacity: 1; transform: translateX(0); }
}

.grove-tool-icon-img {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: var(--grove-radius-sm);
}

.grove-tool-icon-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--grove-radius-sm);
}

/* ============================================
   MOBILE BOTTOM TABS
   ============================================ */
.grove-mobile-tabs {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--grove-white);
    border-top: 1px solid var(--grove-gray-200);
    z-index: 30;
    padding: 4px 0;
    padding-bottom: env(safe-area-inset-bottom, 4px);
}

.grove-mobile-tabs .grove-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--grove-gray-400);
    font-size: 10px;
    font-family: var(--grove-font);
    font-weight: 500;
    transition: color var(--grove-transition);
}

.grove-mobile-tabs .grove-tab.active {
    color: var(--grove-orange);
}

/* Mobile FAB */
.grove-fab {
    display: none;
    position: fixed;
    bottom: 80px;
    right: 16px;
    width: 56px;
    height: 56px;
    background: var(--grove-orange);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(232,113,58,0.4);
    z-index: 25;
    text-decoration: none;
    transition: transform var(--grove-transition);
}

.grove-fab:hover {
    transform: scale(1.05);
}

/* Inline CTA in chat */
.grove-inline-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--grove-orange);
    color: var(--grove-white);
    border-radius: var(--grove-radius-xl);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
    transition: background var(--grove-transition);
}

.grove-inline-cta:hover {
    background: var(--grove-orange-hover);
    color: var(--grove-white);
}


/* ============================================
   RESPONSIVE: TABLET (768-1024px)
   ============================================ */
@media (max-width: 1024px) {
    .grove-sidebar-left {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        transition: left 0.3s ease;
        z-index: 21;
    }

    .grove-sidebar-left.open {
        left: 0;
    }

    .grove-sidebar-right {
        position: fixed;
        right: -320px;
        top: 0;
        bottom: 0;
        transition: right 0.3s ease;
        z-index: 21;
        box-shadow: var(--grove-shadow-lg);
    }

    .grove-sidebar-right.open {
        right: 0;
    }

    .grove-right-close {
        display: flex;
    }
}

/* ============================================
   RESPONSIVE: MOBILE (<768px)
   ============================================ */
@media (max-width: 768px) {
    .grove-sidebar-left {
        width: 280px;
       	z-index: 9999;
    }

    .grove-sidebar-right {
        width: calc(100% - 60px);
        right: calc(-100% + 60px);
    }

    .grove-sidebar-right.open {
        right: 0;
    }

    .grove-mobile-tabs {
        display: flex;
    }

    .grove-fab {
        display: flex;
    }

    .grove-chat-panel {
        padding-bottom: 60px; /* Space for bottom tabs */
	-webkit-overflow-scrolling: touch;
    }

    .grove-input-area {
        position: fixed;
        bottom: 56px;
        left: 0;
        right: 0;
        padding-bottom: 8px;
        background: var(--grove-white);
        z-index: 10;
        border-top: 1px solid var(--grove-gray-200);
    }

    .grove-messages {
        padding-bottom: 130px; /* Space for fixed input + tabs */
	height: 100vh;
    	overflow-y: auto;
    }

    .grove-welcome-title {
        font-size: 22px;
    }

    .grove-welcome-subtitle {
        font-size: 14px;
    }

    .grove-prompt-cards {
        grid-template-columns: 1fr;
    }

    .grove-message {
        padding: 12px 16px;
    }

    .grove-message-content {
        font-size: 14px;
    }

    .grove-cta-section {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 25;
        background: var(--grove-white);
        border-top: 1px solid var(--grove-gray-200);
        display: none; /* Hidden on mobile, use FAB instead */
    }
}
.grove-question-error{
   color:#ff4f55;
}
/* ============================================
   SCROLLBAR STYLING
   ============================================ */
.grove-messages::-webkit-scrollbar,
.grove-history-list::-webkit-scrollbar,
.grove-right-content::-webkit-scrollbar {
    width: 6px;
}

.grove-messages::-webkit-scrollbar-track,
.grove-history-list::-webkit-scrollbar-track,
.grove-right-content::-webkit-scrollbar-track {
    background: transparent;
}

.grove-messages::-webkit-scrollbar-thumb,
.grove-right-content::-webkit-scrollbar-thumb {
    background: var(--grove-gray-300);
    border-radius: 3px;
}

.grove-history-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes grove-fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.grove-message {
    animation: grove-fadeIn 0.3s ease;
}

.grove-message-system {
    animation: grove-fadeIn 0.4s ease;
}

/* Highlight pulse for right panel items */
@keyframes grove-pulse {
    0% { box-shadow: 0 0 0 0 rgba(232,113,58,0.3); }
    70% { box-shadow: 0 0 0 6px rgba(232,113,58,0); }
    100% { box-shadow: 0 0 0 0 rgba(232,113,58,0); }
}

.grove-resource-item.pulse {
    animation: grove-pulse 1s ease 1;
}


/**
 * Grove AI - Admin Stylesheet
 * Styles for the WordPress admin settings page
 * Milestone 2: Conversations, Leads, Analytics, Modals, Badges, Charts
 */

/* ── Admin Wrap ──────────────────────────── */
.grove-admin-wrap {
    max-width: 1100px;
    margin: 20px auto 0 auto;
}

.grove-admin-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 20px;
}

.grove-admin-logo {
    font-size: 32px;
}

/* ── Stats Bar ───────────────────────────── */
.grove-admin-stats-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.grove-stat-card {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 14px 20px;
    flex: 1;
    min-width: 120px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.grove-stat-value {
    display: block;
    font-size: 26px;
    font-weight: 700;
    color: #E8713A;
    line-height: 1.2;
}

.grove-stat-label {
    display: block;
    font-size: 11px;
    color: #646970;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Tabs ─────────────────────────────────── */
.grove-admin-tabs {
    margin-bottom: 0;
    flex-wrap: wrap;
}

.grove-admin-tabs .nav-tab {
    font-size: 13px;
    padding: 8px 14px;
}

.grove-admin-tabs .nav-tab-active {
    background: #fff;
    border-bottom-color: #fff;
}

/* ── Content Area ─────────────────────────── */
.grove-admin-content {
    background: #fff;
    border: 1px solid #dcdcde;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 24px 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* ── Form Table ───────────────────────────── */
.grove-form-table th {
    padding: 16px 10px 16px 0;
    width: 200px;
    vertical-align: top;
}

.grove-form-table td {
    padding: 12px 10px;
}

.grove-form-table label {
    font-weight: 500;
}

.grove-input-wide {
    width: 100% !important;
    max-width: 500px;
}

.grove-section-title {
    color: #1d2327;
    font-size: 15px;
    font-weight: 600;
    margin: 8px 0 0 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f1;
}

/* ── Status Indicators ────────────────────── */
.grove-status {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
}

.grove-status-ok {
    color: #00a32a;
}

.grove-status-warning {
    color: #dba617;
}

.grove-status-error {
    color: #d63638;
}

/* ── Prompt Editor ────────────────────────── */
.grove-prompt-section {
    margin: 0;
}

.grove-prompt-textarea {
    font-family: 'Menlo', 'Monaco', 'Consolas', monospace;
    font-size: 12.5px;
    line-height: 1.6;
    border-radius: 6px;
    padding: 16px;
    resize: vertical;
    min-height: 400px;
    width: 100% !important;
    background: #f9fafb;
}

.grove-prompt-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.grove-char-count {
    font-size: 12px;
    color: #646970;
    flex: 1;
}

/* ── Buttons ──────────────────────────────── */
.grove-btn-secondary {
    background: #f0f0f1 !important;
    border-color: #c3c4c7 !important;
    color: #1d2327 !important;
}

.grove-btn-secondary:hover {
    background: #e0e0e0 !important;
}

.grove-btn-danger {
    background: #d63638 !important;
    border-color: #d63638 !important;
    color: #fff !important;
}

.grove-btn-danger:hover {
    background: #b32d2e !important;
    border-color: #b32d2e !important;
}

/* ── Notices ──────────────────────────────── */
.grove-notice {
    padding: 16px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.5;
}

.grove-notice-info {
    background: #f0f6fc;
    border: 1px solid #c3d7ec;
    color: #1d2327;
}

/* ── Info Table ───────────────────────────── */
.grove-admin-info {
    margin-top: 30px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.grove-admin-info h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
}

.grove-info-table {
    width: 100%;
    border-collapse: collapse;
}

.grove-info-table td {
    padding: 6px 12px;
    font-size: 13px;
    border-bottom: 1px solid #e5e7eb;
}

.grove-info-table td:first-child {
    font-weight: 500;
    color: #646970;
    width: 160px;
}

.grove-info-table td:last-child {
    color: #1d2327;
}

.grove-info-table code {
    background: #e5e7eb;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

/* ── Topics Section ───────────────────────── */
.grove-topics-section textarea {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    line-height: 1.5;
}

/* ── ActiveCampaign Section ───────────────── */
.grove-ac-section {
    margin: 0;
}

.grove-ac-test-result {
    display: inline-block;
    margin-left: 12px;
    font-weight: 500;
}

.grove-ac-sync-info {
    margin-top: 24px;
    padding: 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.grove-ac-sync-info h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
}

.grove-ac-fields-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.grove-ac-field-tag {
    display: inline-block;
    background: #E8713A15;
    border: 1px solid #E8713A40;
    color: #b5572a;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Menlo', 'Monaco', 'Consolas', monospace;
}

/* ── Submit Button ────────────────────────── */
.grove-admin-content .submit {
    padding-top: 16px;
    border-top: 1px solid #f0f0f1;
    margin-top: 20px;
}

.grove-admin-content .button-primary {
    background: #E8713A !important;
    border-color: #d4652f !important;
    font-size: 14px;
    padding: 6px 24px;
    height: auto;
}

.grove-admin-content .button-primary:hover {
    background: #d4652f !important;
    border-color: #c05a28 !important;
}

/* ═══════════════════════════════════════════════
   MILESTONE 2: Admin Filters & Tables
   ═══════════════════════════════════════════════ */

/* ── Admin Filters ────────────────────────── */
.grove-admin-filters {
    margin-bottom: 16px;
}

.grove-filter-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.grove-filter-search {
    min-width: 200px;
    padding: 6px 12px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 13px;
}

.grove-filter-select {
    min-width: 130px;
    padding: 6px 10px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 13px;
}

.grove-filter-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.grove-filter-checkbox input[type="checkbox"] {
    margin: 0;
}

.grove-result-count {
    font-size: 12px;
    color: #646970;
    margin: 4px 0 12px;
}

/* ── Badges ────────────────────────────────── */
.grove-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    text-transform: capitalize;
}

.grove-badge-none {
    background: #f0f0f1;
    color: #646970;
}

.grove-badge-partial {
    background: #FEF3C7;
    color: #92400E;
}

.grove-badge-complete {
    background: #D1FAE5;
    color: #065F46;
}

.grove-badge-guest {
    background: #E5E7EB;
    color: #374151;
}

.grove-badge-icp {
    background: #D1FAE5;
    color: #065F46;
    font-weight: 700;
}

/* Intent level badges */
.grove-badge-intent-browsing {
    background: #f0f0f1;
    color: #646970;
}

.grove-badge-intent-exploring {
    background: #DBEAFE;
    color: #1E40AF;
}

.grove-badge-intent-evaluating {
    background: #FEF3C7;
    color: #92400E;
}

.grove-badge-intent-ready_to_buy {
    background: #D1FAE5;
    color: #065F46;
}

/* ── Score Badges ──────────────────────────── */
.grove-score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 24px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.grove-score-high {
    background: #059669;
}

.grove-score-mid {
    background: #F59E0B;
}

.grove-score-low {
    background: #9CA3AF;
}

/* ── Conversations Table ──────────────────── */
.grove-conv-table {
    margin-top: 0;
}

.grove-conv-table .column-id {
    font-size: 12px;
    color: #646970;
}

.grove-view-conv-btn {
    font-size: 12px !important;
}

/* ── Leads Table ──────────────────────────── */
.grove-leads-table {
    margin-top: 0;
}

/* ═══════════════════════════════════════════════
   MILESTONE 2: Modal
   ═══════════════════════════════════════════════ */

.grove-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100100;
    display: none;
}

.grove-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.grove-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 750px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    z-index: 2;
}

.grove-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.grove-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

.grove-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #646970;
    padding: 0 4px;
    line-height: 1;
}

.grove-modal-close:hover {
    color: #1d2327;
}

.grove-modal-meta {
    padding: 12px 24px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.grove-modal-meta-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #1d2327;
}

.grove-modal-meta-grid strong {
    color: #646970;
    font-weight: 500;
}

.grove-modal-messages {
    overflow-y: auto;
    padding: 16px 24px;
    flex: 1;
    min-height: 200px;
}

/* ── Admin Message Viewer ─────────────────── */
.grove-admin-msg {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
}

.grove-admin-msg-user {
    background: #f0f6fc;
    border: 1px solid #c3d7ec;
}

.grove-admin-msg-assistant {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.grove-admin-msg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.grove-admin-msg-role {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.grove-admin-msg-time {
    font-size: 11px;
    color: #9CA3AF;
}

.grove-admin-msg-content {
    color: #1d2327;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ═══════════════════════════════════════════════
   MILESTONE 2: Analytics Charts
   ═══════════════════════════════════════════════ */

/* ── Analytics Period Selector ────────────── */
.grove-analytics-period {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.grove-analytics-period .button-primary {
    pointer-events: none;
}

/* ── Charts Grid ──────────────────────────── */
.grove-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.grove-chart-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px 20px;
}

.grove-chart-card h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
}

.grove-chart-wide {
    grid-column: span 2;
}

/* ── Events Table ─────────────────────────── */
.grove-events-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

.grove-events-table th,
.grove-events-table td {
    padding: 8px 12px;
    text-align: left;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f1;
}

.grove-events-table th {
    font-weight: 600;
    color: #646970;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.grove-events-table td:first-child {
    text-transform: capitalize;
}

.grove-events-table td:last-child {
    font-weight: 600;
    color: #E8713A;
}

/* ═══════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════ */

@media screen and (max-width: 1100px) {
    .grove-charts-grid {
        grid-template-columns: 1fr;
    }

    .grove-chart-wide {
        grid-column: span 1;
    }
}

@media screen and (max-width: 782px) {
    .grove-admin-wrap {
        margin: 10px;
    }

    .grove-admin-stats-bar {
        flex-direction: column;
    }

    .grove-stat-card {
        min-width: auto;
    }

    .grove-form-table th {
        width: auto;
        display: block;
        padding-bottom: 4px;
    }

    .grove-form-table td {
        display: block;
        padding-top: 0;
    }

    .grove-prompt-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .grove-filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .grove-filter-search,
    .grove-filter-select {
        min-width: auto;
        width: 100%;
    }

    .grove-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .grove-modal-meta-grid {
        flex-direction: column;
        gap: 6px;
    }

    .grove-charts-grid {
        grid-template-columns: 1fr;
    }

    .grove-chart-wide {
        grid-column: span 1;
    }

    .grove-ac-fields-grid {
        gap: 6px;
    }

    .grove-analytics-period {
        flex-wrap: wrap;
    }
}



.grove-message-content {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.7;
    color: #1a1a1a;
    font-size: 16px;
}

.grove-message-content h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 24px 0 12px;
}

.grove-message-content h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 22px 0 10px;
}

.grove-message-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 20px 0 10px;
}

.grove-message-content p {
    margin-bottom: 16px;
}

.grove-message-content ul,
.grove-message-content ol {
    margin: 16px 0;
    padding-left: 22px;
}

.grove-message-content li {
    margin-bottom: 6px;
}

.grove-message-content a {
    color: #2563eb;
    text-decoration: none;
}

.grove-message-content a:hover {
    text-decoration: underline;
}

.grove-message-content code {
    background: #f4f4f4;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 14px;
}

.grove-message-content pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0;
}

.grove-message-content blockquote {
    border-left: 4px solid #2563eb;
    padding-left: 12px;
    color: #555;
    margin: 16px 0;
}

/* ============================================
   ADAPTIVE QUALIFICATION QUESTION CARDS
   ============================================ */

.grove-question-card {
    background: var(--grove-white);
    border: 1px solid var(--grove-gray-200);
    border-radius: var(--grove-radius-lg);
    padding: 20px 24px;
    margin: 8px auto 12px;
    max-width: 672px;
    width: calc(100% - 48px);
    box-shadow: var(--grove-shadow-sm);
    animation: groveQuestionSlideIn 0.35s ease-out;
}

@keyframes groveQuestionSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.grove-question-card.grove-question-answered {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Header */
.grove-question-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    position: relative;
}

.grove-question-avatar {
    width: 32px;
    height: 32px;
    background: rgba(16, 185, 129, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.grove-question-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--grove-gray-900);
    line-height: 1.4;
    flex: 1;
    padding-top: 4px;
}

.grove-question-progress {
    font-size: 12px;
    color: var(--grove-gray-400);
    white-space: nowrap;
    padding-top: 6px;
    flex-shrink: 0;
}

/* Options */
.grove-question-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.grove-question-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--grove-gray-50);
    border: 1px solid var(--grove-gray-200);
    border-radius: var(--grove-radius-md);
    color: var(--grove-gray-900);
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    font-family: var(--grove-font);
    font-size: 14px;
    width: 100%;
}

.grove-question-option:hover {
    background: var(--grove-gray-100);
    border-color: var(--grove-gray-300);
}

.grove-question-option.selected {
    background: var(--grove-green-light);
    border-color: var(--grove-green);
}

.grove-option-num {
    width: 28px;
    height: 28px;
    background: var(--grove-gray-100);
    border-radius: var(--grove-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--grove-gray-500);
    flex-shrink: 0;
}

.grove-question-option.selected .grove-option-num {
    background: var(--grove-green);
    color: var(--grove-white);
}

.grove-option-check {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
    color: var(--grove-gray-300);
}

.grove-question-option.selected .grove-option-check {
    color: var(--grove-green);
}

.grove-option-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.grove-option-content strong {
    font-weight: 600;
    font-size: 14px;
    color: var(--grove-gray-900);
}

.grove-option-hint {
    font-size: 12px;
    color: var(--grove-gray-500);
    font-weight: 400;
}

/* Custom input */
.grove-question-custom {
    margin-top: 4px;
    margin-bottom: 12px;
}

.grove-question-custom-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--grove-white);
    border: 1px solid var(--grove-gray-200);
    border-radius: var(--grove-radius-md);
    color: var(--grove-gray-900);
    font-size: 14px;
    font-family: var(--grove-font);
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.grove-question-custom-input:focus {
    border-color: var(--grove-green);
}

.grove-question-custom-input::placeholder {
    color: var(--grove-gray-400);
}

/* Textarea */
.grove-question-textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--grove-white);
    border: 1px solid var(--grove-gray-200);
    border-radius: var(--grove-radius-md);
    color: var(--grove-gray-900);
    font-size: 14px;
    font-family: var(--grove-font);
    outline: none;
    resize: vertical;
    min-height: 72px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
    margin-bottom: 12px;
}

.grove-question-textarea:focus {
    border-color: var(--grove-green);
}

.grove-question-textarea::placeholder {
    color: var(--grove-gray-400);
}

/* Actions */
.grove-question-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

.grove-question-submit {
    padding: 8px 20px;
    background: var(--grove-green);
    color: var(--grove-white);
    border: none;
    border-radius: var(--grove-radius-sm);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--grove-font);
    cursor: pointer;
    transition: background 0.15s ease;
}

.grove-question-submit:hover {
    background: #059669;
}

.grove-question-skip {
    padding: 8px 16px;
    background: transparent;
    color: var(--grove-gray-500);
    border: 1px solid var(--grove-gray-200);
    border-radius: var(--grove-radius-sm);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--grove-font);
    cursor: pointer;
    transition: all 0.15s ease;
}

.grove-question-skip:hover {
    color: var(--grove-gray-700);
    border-color: var(--grove-gray-300);
}

/*Grove AI Login Form*/
#user-registration{
    padding:50px 0;
}
div.nsl-container[data-align="left"]{
    text-align:center;
    margin-bottom: 150px;
}
div.nsl-container.nsl-container-block .nsl-container-buttons{
   justify-content: center;
    align-self: center;
    align-items: center;
}
/* ── Mobile adjustments for question cards ─── */
@media (max-width: 768px) {
    .grove-question-card {
        margin: 8px auto 12px;
        padding: 16px;
        width: calc(100% - 24px);
    }

    .grove-question-option {
        padding: 10px 12px;
    }
    .grove-fab{
	bottom: 23%;
    	right: 2%;
    }
}

@media (max-width: 380px) {
    .grove-sidebar-right {
        right: calc(-100% + -60px);
    }
}