/* Suggestion Panel Styles */

.suggestion-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3001; /* ensure this sits above most UI */
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.suggestion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e0e0e0;
}

.suggestion-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #16344a;
}

.btn-close-suggestion {
    background: transparent;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close-suggestion:hover {
    color: #000;
}

.suggestion-body {
    padding: 1.25rem;
}

.suggestion-loading,
.suggestion-empty {
    text-align: center;
    padding: 2rem 1.25rem;
    color: #6c757d;
    font-size: 0.95rem;
}

.suggestion-section {
    margin-bottom: 1.5rem;
}

.suggestion-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: #16344a;
    margin-bottom: 0.75rem;
}

.suggestion-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.suggestion-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    background: #f0f4f8;
    color: #2f4961;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggestion-badge:hover {
    background: #e0e9f3;
    border-color: #b0c4de;
}

.suggestion-badge.selected {
    background: #d6e6f5;
    border-color: #16344a;
    color: #16344a;
}

.suggestion-badge i {
    font-size: 0.75rem;
}

.suggestion-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.suggestion-error,
.suggestion-success {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.suggestion-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.suggestion-success {
    background: #efe;
    color: #3a3;
    border: 1px solid #cfc;
}

/* Suggest Button */

.btn-suggest {
    background: transparent;
    border: 1px dashed #b0c4de;
    color: #16344a;
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s ease;
}

.btn-suggest:hover {
    background: #f0f4f8;
    border-color: #16344a;
}

.btn-suggest i {
    font-size: 0.85rem;
}

.btn-suggest--sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.72rem;
}

/* Context-specific positioning */

.suggestion-panel--main-featured {
    /* Default centered positioning is fine for main featured */
}

.suggestion-panel--secondary-featured {
    /* For secondary cards, slightly smaller max-width */
    max-width: 500px;
}

/* Dedicated backdrop element (rendered as a sibling) */
.suggestion-backdrop {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.45);
    z-index: 3000; /* sits directly behind the panel */
}

/* Ensure pseudo-element fallback does not interfere */
.suggestion-panel::before { display: none !important; }

/* Responsive */
@media (max-width: 767.98px) {
    .suggestion-panel {
        max-width: 95%;
        max-height: 90vh;
    }

    .suggestion-header {
        padding: 0.75rem 1rem;
    }

    .suggestion-body {
        padding: 1rem;
    }

    .suggestion-badge {
        font-size: 0.8rem;
        padding: 0.35rem 0.6rem;
    }
}
