/* 
===========================================
    CLIENT PORTAL CSS
    Optimized and Minified Structure
===========================================
*/
/* Glassmorphism Classes */
.tab-content {
    display: none;
    opacity: 0;
    will-change: opacity, transform;
}

.tab-content.active {
    display: block;
    animation: fadeInPortal 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* Glassmorphism Classes - Otimizado para não travar animações */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.btn-premium {
    background: linear-gradient(110deg, #ad7d58 0%, #d4a373 25%, #ad7d58 50%, #d4a373 75%, #ad7d58 100%);
    background-size: 200% auto;
    color: white;
    transition: all 0.5s ease;
}

.btn-premium:hover {
    background-position: right center;
    transform: translateY(-2px);
}

/* Só aplicamos o blur quando a aba está ativa e estável */
.active .glass-panel {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Gamification Stamp Elements */
.stamp-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px dashed #ad7d58;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
    transition: all 0.3s ease;
}

.stamps-grid-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.stamp-circle.stamped {
    background-color: #fff8f5;
    border-style: solid;
    box-shadow: inset 0 2px 4px rgba(173, 125, 88, 0.1);
}

/* Custom VIP Cards */
.vip-card-stats {
    background: linear-gradient(135deg, #fffcf9 0%, #ffffff 100%);
    border: 1px solid #fee2e2;
}

.vip-card-stamps {
    background: white;
    border: 1px solid #f1f5f9;
}

.vip-card-dark {
    background: linear-gradient(to right, #1a1918, #2d2a28) !important;
    color: white !important;
    position: relative;
}

.vip-card-dark .bg-icon {
    position: absolute !important;
    right: -2rem !important;
    bottom: -2rem !important;
    width: 12rem !important;
    height: 12rem !important;
    opacity: 0.08 !important;
    pointer-events: none;
    z-index: 1 !important;
}

.vip-card-dark > div {
    position: relative;
    z-index: 2;
}

.vip-card-dark h3 {
    color: white !important;
}

.vip-header {
    text-align: center;
    width: 100%;
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.referral-input-box {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

/* Skeleton Loading Animation */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: 1rem;
}

@keyframes skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 12px;
    margin-bottom: 8px;
    width: 80%;
}

.skeleton-title {
    height: 20px;
    margin-bottom: 12px;
    width: 60%;
}

.skeleton-circle {
    border-radius: 50%;
    width: 48px;
    height: 48px;
}

/* 
===========================================
    QUICK BOOK MODAL (Performance Optimized)
===========================================
*/
#quick-book-modal {
    z-index: 100;
    transition: opacity 0.3s ease;
    will-change: opacity;
}

#quick-book-modal.active {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

#quick-book-container {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(100%);
    will-change: transform;
}

#quick-book-modal.active #quick-book-container {
    transform: translateY(0);
}

@media (min-width: 768px) {
    #quick-book-container {
        transform: scale(0.95) translateY(20px);
    }
    #quick-book-modal.active #quick-book-container {
        transform: scale(1) translateY(0);
    }
}

/* Slot Grid Optimized */
.quick-slot-grid label input:checked + div {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.quick-slot-btn {
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.quick-slot-btn:hover:not(.disabled) {
    border-color: var(--primary);
    background-color: #fdf5f0;
}

/* Date Input Fix (Icon Overlap) */
#quick-date-input {
    appearance: none;
    -webkit-appearance: none;
    padding-left: 3rem !important; /* Ensure space for the lucide icon */
}

/* Hide native date icon to avoid collision with our custom one */
#quick-date-input::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

/* Slide Animations for Toast */
.animate-slide-up {
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.animate-slide-down {
    animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes slideUp {
    from { opacity: 0; transform: translate(-50%, 20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes slideDown {
    from { opacity: 1; transform: translate(-50%, 0); }
    to { opacity: 0; transform: translate(-50%, 20px); }
}

/* Toast Premium Style */
.portal-toast-premium {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    padding: 0.75rem 1.5rem;
    border-radius: 1.25rem;
    background: rgba(26, 25, 24, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
    pointer-events: none;
}

.portal-toast-premium.success {
    background: rgba(34, 197, 94, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
}
