/* response-toolbar.css */

/* Container for both toolbars */
.response-toolbar-container {
    display: flex; /* Use flex to allow toolbars to sit side-by-side if needed for debugging, but media queries will control visibility */
    flex-direction: column; /* Stack them by default */
    align-items: flex-start; /* Align to the start */
    margin-top: 8px; /* Space below the message bubble */
}

/* --- Desktop Toolbar (New Mockup Design) --- */
.emoji-toolbar.desktop-toolbar { /* More specific selector for desktop toolbar */
    display: none; /* Hidden by default (mobile-first) */
    align-items: center;
    gap: 6px;
    padding: 4px 8px; /* Reduced padding */
    background: white;
    border: 1px solid #e5e5e7;
    border-radius: 24px;
    margin-bottom: 8px; /* Space between toolbar and timestamp */
    max-width: fit-content;
}

.emoji-toolbar.desktop-toolbar .emoji-btn { /* More specific selector */
    width: 28px; /* Reduced width */
    height: 28px; /* Reduced height */
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px; /* Reduced font size */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
}

.emoji-toolbar.desktop-toolbar .emoji-btn:hover { /* More specific selector */
    background: #f5f5f7;
    transform: scale(1.1);
}

.emoji-toolbar.desktop-toolbar .emoji-btn:active { /* More specific selector */
    transform: scale(0.95);
}

.emoji-toolbar.desktop-toolbar .emoji-btn.selected { /* More specific selector */
    background: #e8f2ff;
}

.emoji-toolbar.desktop-toolbar .emoji-btn.selected::after { /* More specific selector */
    content: '';
    position: absolute;
    inset: -2px;
    border: 2px solid #007AFF;
    border-radius: 50%;
}

/* Action buttons separator */
.emoji-toolbar.desktop-toolbar .toolbar-divider { /* More specific selector */
    width: 1px;
    height: 24px;
    background: #e5e5e7;
}

.emoji-toolbar.desktop-toolbar .action-btn { /* More specific selector */
    width: 28px; /* Reduced width */
    height: 28px; /* Reduced height */
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px; /* Reduced font size */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0.6;
}

.emoji-toolbar.desktop-toolbar .action-btn:hover { /* More specific selector */
    background: #f5f5f7;
    opacity: 1;
}

/* --- Mobile Toolbar (Original Design) --- */
.response-actions-toolbar.mobile-toolbar { /* More specific selector for mobile toolbar */
    display: flex; /* Visible by default (mobile-first) */
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 4px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative; /* Changed from absolute to relative for normal flow */
    bottom: auto; /* Reset */
    right: auto; /* Reset */
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10;
    margin-top: 8px; /* Space below the message bubble */
    max-width: fit-content;
}

.response-actions-toolbar.mobile-toolbar .toolbar-section { /* More specific selector */
    display: flex;
    align-items: center;
    gap: 4px;
}

.response-actions-toolbar.mobile-toolbar .toolbar-divider { /* More specific selector */
    width: 1px;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.1);
    margin: 0 4px;
}

.response-actions-toolbar.mobile-toolbar .toolbar-button { /* More specific selector */
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #5f6368;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.response-actions-toolbar.mobile-toolbar .toolbar-button:hover { /* More specific selector */
    background-color: rgba(0, 0, 0, 0.05);
    color: #1a73e8;
}

.response-actions-toolbar.mobile-toolbar .toolbar-button svg { /* More specific selector */
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

.response-actions-toolbar.mobile-toolbar .toolbar-more-container { /* More specific selector */
    position: relative;
    display: block; /* Always block for mobile toolbar */
}

.response-actions-toolbar.mobile-toolbar .toolbar-dropdown { /* More specific selector */
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    padding: 8px;
    z-index: 20;
    width: 240px;
    margin-top: 8px;
}

.response-actions-toolbar.mobile-toolbar .toolbar-dropdown.show { /* More specific selector */
    display: block;
}

.response-actions-toolbar.mobile-toolbar .mobile-dropdown-content { /* More specific selector */
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.response-actions-toolbar.mobile-toolbar .mobile-primary-actions { /* More specific selector */
    display: flex;
}

/* Media Queries for Responsiveness */

/* Media Queries for Responsiveness */

/* On large screens, hide mobile toolbar and show desktop toolbar */
@media (min-width: 769px) {
    .emoji-toolbar.desktop-toolbar { /* Show the new desktop toolbar */
        display: flex;
    }
    .response-actions-toolbar.mobile-toolbar { /* Hide the mobile toolbar */
        display: none;
    }
}
