/* ========================================
   VNBR Review System - Styles
   ======================================== */

/* Modal Styles */
.vnbr-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
}

.vnbr-modal.active {
    display: flex;
}

.vnbr-modal-content {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

/* Glass Panel Effect */
.glass-panel {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Progress Bar */
.vnbr-bar-bg {
    background: rgba(255, 255, 255, 0.1);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.vnbr-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Criteria Row Hover */
.vnbr-criteria-row {
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.vnbr-criteria-row:hover,
.vnbr-criteria-row.active {
    background: rgba(255, 255, 255, 0.1);
}

/* Filter Buttons */
.filter-btn {
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
    cursor: pointer;
}

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

.filter-btn:not(.active) {
    background: rgba(255, 255, 255, 0.02);
    color: rgb(148, 163, 184);
}

.filter-btn:hover {
    background: var(--brand-blue, #3b82f6);
    color: white;
}

/* Select Dropdown */
.vnbr-select {
    appearance: none;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.75rem;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    width: 100%;
    cursor: pointer;
}

.vnbr-select:focus {
    outline: none;
    border-color: var(--brand-blue, #3b82f6);
}

/* Star Rating Widget */
.vnbr-star-rating-widget .star-icon {
    color: rgb(71, 85, 105);
    transition: color 0.15s;
}

.vnbr-star-rating-widget .star-icon.selected,
.vnbr-star-rating-widget .star-icon.hovered {
    color: var(--brand-gold, #fbbf24);
}

/* Image Grid */
.vnbr-img-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
}

.vnbr-img-grid a {
    display: block;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.vnbr-img-grid img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    transition: transform 0.2s;
}

.vnbr-img-grid a:hover img {
    transform: scale(1.05);
}

/* Image Preview (Form Upload) */
.vnbr-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.vnbr-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vnbr-remove-img {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.vnbr-remove-img:hover {
    background: rgb(220, 38, 38);
}

/* Animation */
.animate-fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility Colors (Fallback nếu không có Tailwind) */
:root {
    --brand-blue: #3b82f6;
    --brand-gold: #fbbf24;
    --brand-green: #10b981;
}

.bg-brand-blue {
    background-color: var(--brand-blue);
}

.bg-brand-gold {
    background-color: var(--brand-gold);
}

.bg-brand-green {
    background-color: var(--brand-green);
}

.text-brand-blue {
    color: var(--brand-blue);
}

.text-brand-gold {
    color: var(--brand-gold);
}

.border-brand-gold {
    border-color: var(--brand-gold);
}

.border-brand-blue {
    border-color: var(--brand-blue);
}

/* Responsive */
@media (max-width: 768px) {
    .vnbr-modal-content {
        padding: 1.5rem;
    }
    
    .vnbr-img-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
    
    .vnbr-img-grid img {
        height: 60px;
    }
}
