/**
 * Shortcut Suggestions Styles - Chat UI
 *
 * Styles for clickable suggestion buttons that appear after bot messages.
 * All selectors use specific class names to prevent conflicts.
 */

/* Suggestions Container (Per-Message) */
.suggestion-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    margin: 12px auto;
    margin: 0 auto;
    padding: 0 12px;
}

.suggestion-container.visible {
    opacity: 1;
    transform: translateY(0);
    justify-content: center;
}

/* Static Query Suggestions Container (Above Input Field) */
.static-query-suggestions-wrapper {
    padding: 0;
    background: transparent;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    width: 100%;
}

.additional-query-suggestions-wrapper {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(50% + 8px);
    padding: 6px 12px 10px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 0 5px rgba(97, 98, 98, 0.5);
    background-color: var(--input-focus-bg);
    color: var(--input-focus-text);
    margin: 0 auto;
    width: 100%;
    max-width: 56rem;
    border-radius: 12px 12px 0 0;
    z-index: 1000;
}

.additional-query-suggestions-wrapper.visible {
    opacity: 1;
    transform: translateY(0);
}

.additional-suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#additionalQuerySuggestionsContainer .additional-suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 0;
    background: transparent;
    padding: 6px 4px;
    font-size: 14px;
    color: #3f3f3f;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    height: unset;
}

#additionalQuerySuggestionsContainer .additional-suggestion-item:hover {
    color: #111111;
    background: #a8a7a429;
    border-radius: 8px;
}

#additionalQuerySuggestionsContainer .additional-suggestion-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0.6;
}

#additionalQuerySuggestionsContainer .additional-suggestion-text {
    flex: 1;
    white-space: normal;
}

.static-query-suggestions-wrapper.visible {
    opacity: 1;
    transform: translateY(0);
    margin: 12px 0 0;
    max-width: none;
    z-index: 10;
}

/* Static Suggestions Row - Horizontal Scrolling */
.static-suggestions-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 0;
    scrollbar-width: thin;
    scrollbar-color: #d0d0d0 transparent;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.static-suggestions-row::-webkit-scrollbar {
    height: 1px;
    display: none;
}

.static-suggestions-row::-webkit-scrollbar-track {
    background: transparent;
}

.static-suggestions-row::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 3px;
}

.static-suggestions-row::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

/* Static Suggestion Buttons - No Wrapping */
.static-suggestion-btn {
    flex-shrink: 0; /* Prevent shrinking */
    white-space: nowrap; /* Prevent text wrapping */
    max-width: 300px;
    min-width: fit-content;
}

/* Individual Suggestion Button */
.suggestion-btn {
    padding: 8px 16px;
    border: 1px solid #d0d0d0;
    border-radius: 20px;
    font-size: 14px;
    color: #6c6c6c;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
    font-family: inherit;
    line-height: 1.4;
    box-shadow: 0 3px 3px rgba(0, 0, 0, 0.1);
    inset: auto auto 20px 50%;
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(22px) saturate(180%);
    color: var(--text-color, #000000);
}

.suggestion-btn:hover {
    background: #ffffff;
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgb(85 85 85 / 30%);
}

.suggestion-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

.suggestion-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .suggestion-container {
        gap: 6px;
        padding: 10px;
        margin-top: 10px;
    }

    .suggestion-btn {
        padding: 6px 12px;
        font-size: 13px;
        max-width: 100%;
    }

    .static-query-suggestions-wrapper.visible {
        margin-bottom: 30px;
    }
}

.fresh-suggestions-anchor .static-query-suggestions-wrapper,
#staticSuggestionsAnchor .static-query-suggestions-wrapper {
    margin: 0;
    border: none;
    padding-top: 0;
}

#staticSuggestionsAnchor .static-query-suggestions-wrapper {
    margin: 16px auto 0;
    padding-top: 12px;
    border-top: 1px solid transparent;
}

.fresh-chat-wrapper #staticSuggestionsAnchor .static-query-suggestions-wrapper {
    margin: 0;
    padding-top: 0;
    border-top: none;
}

/* Two-row horizontal scroll for fresh chat only */
.fresh-chat-wrapper #staticSuggestionsAnchor .static-query-suggestions-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.fresh-chat-wrapper #staticSuggestionsAnchor .static-query-suggestions-wrapper::-webkit-scrollbar {
    height: 1px;
    display: none;
}

.fresh-chat-wrapper #staticSuggestionsAnchor .static-suggestions-grid {
    display: grid;
    grid-template-rows: repeat(2, auto);
    row-gap: 10px;
    width: max-content;
    padding: 6px 0;
}

.fresh-chat-wrapper #staticSuggestionsAnchor .static-suggestions-grid .static-suggestions-row {
    display: flex;
    gap: 10px;
    width: max-content;
}

/* Dark Mode Support (if your chat interface supports it) */
/* @media (prefers-color-scheme: dark) {
    .suggestion-container {
        background: #2c2c2c;
        border-color: #444;
    }

    .suggestion-btn {
        background: #383838;
        border-color: #555;
        color: #e0e0e0;
    }

    .suggestion-btn:hover {
        background: #2980b9;
        border-color: #2980b9;
        color: white;
    }
} */

/* Animation for removal */
.suggestion-container.removing {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Loading state (optional, if you want to show loading before suggestions appear) */
.suggestion-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

.suggestion-container.loading .suggestion-btn {
    cursor: wait;
}
