/**
 * Wolk Propuestas - CSS Base
 * 
 * Estilos propios del sistema de propuestas.
 * Tailwind se carga desde CDN, este archivo es para estilos custom.
 *
 * @package Wolk_Propuestas
 */

/* ==========================================================================
   RESET Y BASE
   ========================================================================== */

/* Remove WordPress theme header border/line on wolk pages */
#wolk-login-container,
.wolk-app-container {
    margin-top: -1px;
    position: relative;
    z-index: 1;
}

/* Kill any borders/lines from theme elements near our containers */
#wolk-login-container ~ *,
.wolk-app-container ~ * {
    border-top: none !important;
}

/* Theme header - remove bottom border when on our pages */
body:has(#wolk-login-container) header,
body:has(#wolk-login-container) .site-header,
body:has(#wolk-login-container) nav,
body:has(#wolk-login-container) .elementor-location-header,
body:has(.wolk-app-container) header,
body:has(.wolk-app-container) .site-header,
body:has(.wolk-app-container) nav,
body:has(.wolk-app-container) .elementor-location-header {
    border-bottom: none !important;
    box-shadow: none !important;
}

/* Asegurar que no hay rastros de WordPress */
#wpadminbar,
.admin-bar,
#adminmenumain,
#wpfooter,
.screen-reader-text,
.skip-link,
.wp-block-*,
.has-* {
    display: none !important;
}

html {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body {
    margin: 0 !important;
    padding: 0 !important;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   VARIABLES CSS
   ========================================================================== */

:root {
    /* Colores Wolk */
    --wolk-primary: #3b82f6;
    --wolk-primary-dark: #1d4ed8;
    --wolk-primary-light: #60a5fa;
    --wolk-secondary: #8b5cf6;
    --wolk-accent: #06b6d4;
    
    /* Estados */
    --wolk-success: #10b981;
    --wolk-warning: #f59e0b;
    --wolk-error: #ef4444;
    --wolk-info: #3b82f6;
    
    /* Grises */
    --wolk-gray-50: #f9fafb;
    --wolk-gray-100: #f3f4f6;
    --wolk-gray-200: #e5e7eb;
    --wolk-gray-300: #d1d5db;
    --wolk-gray-400: #9ca3af;
    --wolk-gray-500: #6b7280;
    --wolk-gray-600: #4b5563;
    --wolk-gray-700: #374151;
    --wolk-gray-800: #1f2937;
    --wolk-gray-900: #111827;
    
    /* Gradientes */
    --wolk-gradient-primary: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    --wolk-gradient-accent: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    
    /* Sombras */
    --wolk-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --wolk-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --wolk-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --wolk-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transiciones */
    --wolk-transition: 0.2s ease-in-out;
    
    /* Radios */
    --wolk-radius-sm: 0.375rem;
    --wolk-radius: 0.5rem;
    --wolk-radius-lg: 0.75rem;
    --wolk-radius-xl: 1rem;
    --wolk-radius-full: 9999px;
}

/* ==========================================================================
   LOADING STATES
   ========================================================================== */

.wolk-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--wolk-gradient-primary);
}

.wolk-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wolk-spin 1s linear infinite;
}

.wolk-spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

@keyframes wolk-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Skeleton loading */
.wolk-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: wolk-skeleton 1.5s ease-in-out infinite;
}

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

/* ==========================================================================
   COMPONENTES BASE
   ========================================================================== */

/* Botones */
.wolk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25rem;
    border-radius: var(--wolk-radius-lg);
    transition: all var(--wolk-transition);
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.wolk-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.wolk-btn-primary {
    background: var(--wolk-primary);
    color: white;
}

.wolk-btn-primary:hover {
    background: var(--wolk-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--wolk-shadow-lg);
}

.wolk-btn-secondary {
    background: white;
    color: var(--wolk-gray-700);
    border: 1px solid var(--wolk-gray-300);
}

.wolk-btn-secondary:hover {
    background: var(--wolk-gray-50);
    border-color: var(--wolk-gray-400);
}

.wolk-btn-success {
    background: var(--wolk-success);
    color: white;
}

.wolk-btn-success:hover {
    background: #059669;
}

.wolk-btn-whatsapp {
    background: #25d366;
    color: white;
}

.wolk-btn-whatsapp:hover {
    background: #1fb855;
}

.wolk-btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.wolk-btn-xl {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
}

/* Cards */
.wolk-card {
    background: white;
    border-radius: var(--wolk-radius-xl);
    box-shadow: var(--wolk-shadow);
    overflow: hidden;
}

.wolk-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--wolk-gray-200);
}

.wolk-card-body {
    padding: 1.5rem;
}

.wolk-card-footer {
    padding: 1.5rem;
    background: var(--wolk-gray-50);
    border-top: 1px solid var(--wolk-gray-200);
}

/* Inputs */
.wolk-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--wolk-gray-900);
    background: white;
    border: 1px solid var(--wolk-gray-300);
    border-radius: var(--wolk-radius-lg);
    transition: all var(--wolk-transition);
}

.wolk-input:focus {
    outline: none;
    border-color: var(--wolk-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.wolk-input::placeholder {
    color: var(--wolk-gray-400);
}

.wolk-input-error {
    border-color: var(--wolk-error);
}

.wolk-input-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* ==========================================================================
   PANTALLA DE BIENVENIDA (WOW)
   ========================================================================== */

.wolk-welcome {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wolk-gradient-primary);
    position: relative;
    overflow: hidden;
}

.wolk-welcome::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.wolk-welcome-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
    max-width: 600px;
}

.wolk-welcome-logo {
    width: 200px;
    height: auto;
    margin-bottom: 2rem;
    animation: wolk-fade-in 0.8s ease-out;
}

.wolk-welcome-title {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    animation: wolk-fade-in-up 0.8s ease-out 0.2s both;
}

.wolk-welcome-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    animation: wolk-fade-in-up 0.8s ease-out 0.4s both;
}

/* ==========================================================================
   ANIMACIONES
   ========================================================================== */

@keyframes wolk-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes wolk-fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wolk-fade-in-down {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wolk-scale-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes wolk-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes wolk-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Clases de utilidad para animaciones */
.wolk-animate-fade-in {
    animation: wolk-fade-in 0.5s ease-out;
}

.wolk-animate-fade-in-up {
    animation: wolk-fade-in-up 0.5s ease-out;
}

.wolk-animate-scale-in {
    animation: wolk-scale-in 0.3s ease-out;
}

.wolk-animate-pulse {
    animation: wolk-pulse 2s ease-in-out infinite;
}

/* ==========================================================================
   ESTADOS DE PROPUESTA
   ========================================================================== */

.wolk-estado {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--wolk-radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wolk-estado-borrador {
    background: var(--wolk-gray-200);
    color: var(--wolk-gray-700);
}

.wolk-estado-pendiente {
    background: #fef3c7;
    color: #92400e;
}

.wolk-estado-lista {
    background: #dbeafe;
    color: #1e40af;
}

.wolk-estado-enviada {
    background: #ede9fe;
    color: #5b21b6;
}

.wolk-estado-vista {
    background: #cffafe;
    color: #0e7490;
}

.wolk-estado-aceptada {
    background: #d1fae5;
    color: #065f46;
}

.wolk-estado-rechazada {
    background: #fee2e2;
    color: #991b1b;
}

/* ==========================================================================
   CÓDIGO DE ACCESO
   ========================================================================== */

.wolk-code-input {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.5rem;
    text-align: center;
    text-transform: uppercase;
    padding: 1rem 2rem;
    border: 3px dashed var(--wolk-primary);
    border-radius: var(--wolk-radius-xl);
    background: rgba(59, 130, 246, 0.05);
}

.wolk-code-input:focus {
    border-style: solid;
    background: white;
}

.wolk-code-display {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.5rem;
    color: var(--wolk-primary-dark);
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 1.5rem 3rem;
    border-radius: var(--wolk-radius-xl);
    border: 2px solid var(--wolk-primary-light);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 640px) {
    .wolk-welcome-title {
        font-size: 2rem;
    }
    
    .wolk-welcome-subtitle {
        font-size: 1rem;
    }
    
    .wolk-welcome-logo {
        width: 150px;
    }
    
    .wolk-code-input,
    .wolk-code-display {
        font-size: 1.5rem;
        letter-spacing: 0.25rem;
        padding: 1rem;
    }
    
    .wolk-btn {
        padding: 0.625rem 1.25rem;
    }
}

/* ==========================================================================
   UTILIDADES
   ========================================================================== */

.wolk-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.wolk-gradient-text {
    background: var(--wolk-gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wolk-shadow-glow {
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.3);
}

/* Hide scrollbar pero permitir scroll */
.wolk-no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.wolk-no-scrollbar::-webkit-scrollbar {
    display: none;
}

/* ==========================================================================
   ANIMACIÓN DE GRADIENTE ÉPICO
   ========================================================================== */

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

.wolk-gradient-animated {
    background: linear-gradient(-45deg, #1e3a8a, #3b82f6, #06b6d4, #8b5cf6);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* ==========================================================================
   SLIDERS PERSONALIZADOS
   ========================================================================== */

/* Estilo base para todos los sliders */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 12px;
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease;
}

/* Thumb (el círculo que se arrastra) - WebKit */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: 4px solid currentColor;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Thumb - Firefox */
input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: 4px solid currentColor;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.15);
}

/* Track - Firefox */
input[type="range"]::-moz-range-track {
    height: 12px;
    border-radius: 8px;
    background: #e5e7eb;
}

/* Focus state */
input[type="range"]:focus {
    outline: none;
}

input[type="range"]:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3), 0 4px 12px rgba(0,0,0,0.2);
}

/* ==========================================================================
   EFECTOS DE GLASS
   ========================================================================== */

.wolk-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.wolk-glass-dark {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   ANIMACIONES DE NÚMEROS
   ========================================================================== */

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

.wolk-count-animation {
    animation: countUp 0.8s ease-out forwards;
}

/* Pulse suave para elementos importantes */
@keyframes softPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); 
    }
    50% { 
        box-shadow: 0 0 0 15px rgba(59, 130, 246, 0); 
    }
}

.wolk-pulse {
    animation: softPulse 2s infinite;
}

/* ========================================
   DOCTOR DE PROYECTOS - ANIMACIONES
   ======================================== */
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}
@keyframes loading {
    0% { width: 0%; }
    100% { width: 100%; }
}
/* Slider custom styling */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
input[type="range"]::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ============================================
   🩺 DOCTOR EJEMPLO MODAL - ANIMACIONES
   ============================================ */

@keyframes drFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}
@keyframes drBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}
@keyframes drShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px) rotate(-2deg); }
    40% { transform: translateX(6px) rotate(2deg); }
    60% { transform: translateX(-4px) rotate(-1deg); }
    80% { transform: translateX(4px) rotate(1deg); }
}
@keyframes drSlideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes drFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes drGrow {
    from { width: 0%; }
    to { width: 100%; }
}
@keyframes drPulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
    50% { box-shadow: 0 0 20px 10px rgba(16,185,129,0.2); }
}
@keyframes drMoney {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-60px) scale(1.5); }
}
@keyframes drWalk {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(4px) scaleX(-1); }
    50% { transform: translateX(8px); }
    75% { transform: translateX(4px) scaleX(-1); }
}
@keyframes drDrop {
    0% { opacity: 0; transform: translateY(-30px) rotate(-10deg); }
    60% { transform: translateY(5px) rotate(2deg); }
    100% { opacity: 1; transform: translateY(0) rotate(0); }
}
@keyframes drCountUp {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes drCelebrate {
    0% { transform: scale(1) rotate(0); }
    25% { transform: scale(1.3) rotate(-5deg); }
    50% { transform: scale(1) rotate(5deg); }
    75% { transform: scale(1.3) rotate(-3deg); }
    100% { transform: scale(1) rotate(0); }
}
@keyframes drBarGrow {
    from { height: 0; }
}
@keyframes drLineIn {
    from { stroke-dashoffset: 1000; }
    to { stroke-dashoffset: 0; }
}
@keyframes drConfetti {
    0% { opacity: 1; transform: translateY(0) rotate(0deg); }
    100% { opacity: 0; transform: translateY(-100px) rotate(720deg); }
}
@keyframes drScaleIn {
    from { opacity: 0; transform: scale(0); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes drSlideRight {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes drX {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; transform: scale(1.5); color: #ef4444; }
}

.dr-float { animation: drFloat 3s ease-in-out infinite; }
.dr-bounce { animation: drBounce 1s ease-in-out infinite; }
.dr-shake { animation: drShake 0.6s ease-in-out; }
.dr-slideup { animation: drSlideUp 0.6s ease-out both; }
.dr-fadein { animation: drFadeIn 0.5s ease-out both; }
.dr-celebrate { animation: drCelebrate 0.8s ease-in-out; }
.dr-scalein { animation: drScaleIn 0.4s ease-out both; }
.dr-slideright { animation: drSlideRight 0.5s ease-out both; }
.dr-drop { animation: drDrop 0.5s ease-out both; }
.dr-pulseglow { animation: drPulseGlow 2s ease-in-out infinite; }

.dr-scene { transition: opacity 0.4s ease, transform 0.4s ease; }
.dr-emoji-lg { font-size: 4rem; line-height: 1; }
.dr-emoji-xl { font-size: 5rem; line-height: 1; }

/* Mini bar chart animation */
.dr-bar { animation: drBarGrow 0.8s ease-out both; transform-origin: bottom; }
.dr-bar:nth-child(1) { animation-delay: 0.1s; }
.dr-bar:nth-child(2) { animation-delay: 0.3s; }
.dr-bar:nth-child(3) { animation-delay: 0.5s; }
.dr-bar:nth-child(4) { animation-delay: 0.7s; }
.dr-bar:nth-child(5) { animation-delay: 0.9s; }

/* Confetti particles */
.dr-confetti { position: absolute; animation: drConfetti 1.5s ease-out forwards; pointer-events: none; }
.dr-confetti:nth-child(1) { left: 20%; animation-delay: 0s; }
.dr-confetti:nth-child(2) { left: 40%; animation-delay: 0.1s; }
.dr-confetti:nth-child(3) { left: 60%; animation-delay: 0.2s; }
.dr-confetti:nth-child(4) { left: 80%; animation-delay: 0.15s; }
.dr-confetti:nth-child(5) { left: 50%; animation-delay: 0.25s; }

/* Animations for accept modal */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
