/* AI-Powered Recommendation Engine Styles */

.recommendation-widget {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 350px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.recommendation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.recommendation-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    color: #74b9ff;
}

.btn-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-close:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.recommendation-content {
    padding: 16px 20px;
    max-height: 400px;
    overflow-y: auto;
}

.recommendation-loading {
    text-align: center;
    padding: 20px 0;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(116, 185, 255, 0.3);
    border-top: 3px solid #74b9ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.recommendation-item {
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.recommendation-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(116, 185, 255, 0.3);
    transform: translateY(-2px);
}

.recommendation-style-info h4 {
    margin: 0 0 8px 0;
    color: #74b9ff;
    font-size: 1rem;
}

.confidence-bar {
    position: relative;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-bottom: 12px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #74b9ff, #0984e3);
    border-radius: 3px;
    transition: width 0.8s ease;
}

.confidence-text {
    position: absolute;
    right: 0;
    top: -20px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

.recommendation-reason {
    margin-bottom: 12px;
}

.recommendation-reason p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

.recommendation-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.75rem;
}

.compatibility-score,
.usage-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.7);
}

.trend-trending_up {
    color: #00b894;
}

.trend-stable {
    color: #74b9ff;
}

.trend-declining {
    color: #fd79a8;
}

.recommendation-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.btn-use-style,
.btn-feedback {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-use-style:hover {
    background: rgba(116, 185, 255, 0.2);
    border-color: #74b9ff;
}

.btn-feedback:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.suggested-prompts {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 12px;
}

.suggested-prompts h5 {
    margin: 0 0 8px 0;
    font-size: 0.8rem;
    color: #74b9ff;
}

.suggested-prompts ul {
    margin: 0;
    padding-left: 16px;
}

.suggested-prompts li {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.3;
    margin-bottom: 4px;
}

.recommendation-footer {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.recommendation-footer .btn-futuristic {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.no-recommendations {
    text-align: center;
    padding: 20px 0;
    color: rgba(255, 255, 255, 0.7);
}

.recommendation-error {
    text-align: center;
    padding: 20px 0;
    color: rgba(255, 255, 255, 0.7);
}

/* Feedback Modal Styles */
.feedback-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.feedback-modal {
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    margin: 0;
    color: #74b9ff;
}

.modal-content {
    padding: 20px;
}

.rating-section {
    text-align: center;
    margin-bottom: 20px;
}

.star-rating {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.star {
    cursor: pointer;
    color: rgba(255, 255, 255, 0.3);
    transition: all 0.2s ease;
}

.star:hover,
.star.active {
    color: #fdcb6e;
}

.feedback-section {
    margin-bottom: 20px;
}

.feedback-section label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.feedback-section textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-family: inherit;
    resize: vertical;
}

.feedback-section textarea:focus {
    outline: none;
    border-color: #74b9ff;
    background: rgba(255, 255, 255, 0.08);
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Trending Styles */
.trending-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.trending-header h4 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #74b9ff;
}

.btn-back {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.trending-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.trending-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(116, 185, 255, 0.3);
}

.trending-rank {
    font-size: 1.2rem;
    font-weight: bold;
    color: #74b9ff;
    min-width: 24px;
}

.trending-info {
    flex: 1;
}

.trending-info h5 {
    margin: 0 0 4px 0;
    color: white;
    font-size: 0.9rem;
}

.trending-info p {
    margin: 0 0 8px 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.3;
}

.trending-stats {
    display: flex;
    gap: 12px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
}

.trending-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend-score {
    color: #74b9ff;
    font-weight: 500;
}

/* Notification Styles */
.recommendation-notification {
    animation: slideIn 0.3s ease-out;
}

.recommendation-notification.success {
    border-left: 4px solid #00b894;
}

.recommendation-notification.error {
    border-left: 4px solid #e17055;
}

.recommendation-notification.info {
    border-left: 4px solid #74b9ff;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .recommendation-widget {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        margin: 20px 0;
        max-height: none;
    }
    
    .feedback-modal {
        width: 95%;
        margin: 20px;
    }
    
    .recommendation-actions {
        flex-direction: column;
    }
    
    .trending-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .trending-stats {
        flex-wrap: wrap;
        gap: 8px;
    }
}