/* VoidFix WhatsApp CRM - Main Styles */

/* Warm Modern Background */
body {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 25%, #ff9a9e 50%, #fad0c4 75%, #ffecd2 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Warm Gradients */
.gradient-bg {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #ffdde1 100%);
}

.whatsapp-gradient {
    background: linear-gradient(135deg, #25D366 0%, #20ba5a 50%, #128C7E 100%);
}

.ghl-gradient {
    background: linear-gradient(135deg, #FF6B6B 0%, #FFB347 50%, #FFA07A 100%);
}

.warm-card {
    background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
}

.text-ghl {
    color: #FF6B6B;
}

/* Glass Morphism Effect */
.glass-effect {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background-color: rgba(255, 255, 255, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

/* Shimmer Effect */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}

/* Pulse Animation */
@keyframes warmPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(255, 154, 158, 0.7);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 0 10px rgba(255, 154, 158, 0);
        transform: scale(1.05);
    }
}

.warm-pulse {
    animation: warmPulse 2s infinite;
}

/* Smooth Transitions */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(to bottom, #fff5f5, #ffe4e4);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ff9a9e, #fecfef);
    border-radius: 10px;
    border: 2px solid #fff5f5;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ff6b6b, #ffa07a);
}

/* Auth Section Centering */
#authSection {
    display: flex;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh !important;
}

/* Button Styles */
.btn-warm {
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
    transition: all 0.3s ease;
}

.btn-warm:hover {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa07a 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 154, 158, 0.3);
}

/* Icon Styles */
.icon-warm {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe4e4 100%);
    color: #ff6b6b;
}

/* Badge Styles */
.badge-warm {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

/* Fade In Animation */
.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

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

/* Custom scrollbar - WhatsApp Theme */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #128C7E, #25D366);
}

/* Focus Ring Styles */
.focus\:ring-ghl:focus {
    --tw-ring-color: rgba(255, 107, 53, 0.5);
}

.focus\:border-ghl:focus {
    border-color: #FF6B35;
}

.focus\:ring-whatsapp:focus {
    --tw-ring-color: rgba(37, 211, 102, 0.5);
}

.focus\:border-whatsapp:focus {
    border-color: #25D366;
}

/* Message Styles */
.message-bubble {
    max-width: 80%;
    word-wrap: break-word;
}

.mobile-indicator {
    position: relative;
}

.mobile-indicator::after {
    content: '📱';
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 12px;
}

/* Modern Toast Notifications */
.toast {
    min-width: 320px;
    max-width: 400px;
    backdrop-filter: blur(10px);
    animation: slideInRight 0.3s ease-out;
}

.toast-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.95), rgba(22, 163, 74, 0.95));
    border-left: 4px solid #16a34a;
}

.toast-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(220, 38, 38, 0.95));
    border-left: 4px solid #dc2626;
}

.toast-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(217, 119, 6, 0.95));
    border-left: 4px solid #d97706;
}

.toast-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(37, 99, 235, 0.95));
    border-left: 4px solid #2563eb;
}

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

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

/* Interactive Message Previews */
.message-preview {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-left: 4px solid #25D366;
}

.button-preview {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    transition: all 0.2s;
}

.button-preview:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.list-preview {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

/* Professional Header Enhancements */
nav {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.tracking-tight {
    letter-spacing: -0.025em;
}

/* Background color utilities */
.bg-gray-50\/50 {
    background-color: rgba(249, 250, 251, 0.5) !important;
}

.bg-gray-50\/30 {
    background-color: rgba(249, 250, 251, 0.3) !important;
}

/* ========================================
   Professional Page Loader
   ======================================== */

#pageLoader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
    overflow: hidden;
}

#pageLoader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Animated background particles */
#pageLoader::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(147, 51, 234, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: particleMove 20s linear infinite;
}

@keyframes particleMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.loader-container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loader-logo-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.loader-logo {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-10px) scale(1.05); }
}

.loader-logo img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

/* Spinning ring around logo */
.loader-ring {
    position: absolute;
    width: 130px;
    height: 130px;
    border: 3px solid transparent;
    border-top-color: #a855f7;
    border-right-color: #ec4899;
    border-radius: 50%;
    animation: ringRotate 1.5s linear infinite;
}

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

/* Outer pulse ring */
.loader-pulse {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 2px solid rgba(168, 85, 247, 0.4);
    border-radius: 50%;
    animation: pulseRing 2s ease-out infinite;
}

@keyframes pulseRing {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Progress bar */
.loader-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 30px;
    position: relative;
}

.loader-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #a855f7 0%, #ec4899 50%, #a855f7 100%);
    background-size: 200% 100%;
    animation: progressLoad 2s ease-in-out infinite;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
}

@keyframes progressLoad {
    0% {
        width: 0%;
        background-position: 0% 50%;
    }
    50% {
        width: 70%;
        background-position: 100% 50%;
    }
    100% {
        width: 100%;
        background-position: 200% 50%;
    }
}

.loader-text {
    margin-top: 25px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-align: center;
}

.loader-subtext {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 400;
    text-align: center;
}

/* Dots animation */
.loader-dots {
    display: inline-flex;
    margin-left: 4px;
}

.loader-dots span {
    width: 4px;
    height: 4px;
    margin: 0 2px;
    background: #ffffff;
    border-radius: 50%;
    display: inline-block;
    animation: dotBounce 1.4s infinite ease-in-out both;
}

.loader-dots span:nth-child(1) { animation-delay: -0.32s; }
.loader-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}
