/* Custom CSS for Juguería El Mesías */

/* Font Configuration */
body {
    font-family: 'Inter', sans-serif;
}

.font-poppins {
    font-family: 'Poppins', sans-serif;
}

/* Custom Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fadeIn {
    animation: fadeIn 0.4s ease-out;
}

.animate-slideInRight {
    animation: slideInRight 0.5s ease-out;
}

.animate-pulse-custom {
    animation: pulse 2s infinite;
}

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

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

::-webkit-scrollbar-thumb {
    background: #f97316;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ea580c;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-radius: 50%;
    border-top-color: #f97316;
    animation: spin 1s ease-in-out infinite;
}

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

/* Custom Buttons */
.btn-primary {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(249, 115, 22, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 15px -3px rgba(249, 115, 22, 0.4);
}

.btn-secondary {
    background: #6b7280;
    border: none;
    color: white;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

/* Dashboard Styles */
.dashboard-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(243, 244, 246, 0.8);
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: #f97316;
}

/* Product Cards */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #f97316;
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

/* Status Badges */
.status-pendiente {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.status-en_preparacion {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #60a5fa;
}

.status-listo {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #4ade80;
}

.status-entregado {
    background: #e5e7eb;
    color: #374151;
    border: 1px solid #9ca3af;
}

/* Modal Styles */
.modal-overlay {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

/* Form Styles */
.form-input {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.form-input:invalid {
    border-color: #ef4444;
}

/* Navigation Transitions */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: #f97316;
    transition: left 0.3s ease;
}

.nav-link:hover::before {
    left: 0;
}

/* Advanced Animations */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.1);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.1);
    }
    70% {
        transform: scale(1);
    }
}

.animate-slideInLeft {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slideInBottom {
    animation: slideInBottom 0.6s ease-out;
}

.animate-zoomIn {
    animation: zoomIn 0.5s ease-out;
}

.animate-heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* Interactive Elements */
.interactive-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.interactive-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.interactive-card:active {
    transform: translateY(-2px) scale(1.01);
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

/* Accessibility Improvements */
.focus-visible:focus {
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive Design */
@media (max-width: 640px) {
    .product-card {
        margin-bottom: 16px;
    }
    
    .dashboard-card {
        margin-bottom: 16px;
        padding: 16px;
    }
    
    .pos-button {
        min-height: 60px;
        font-size: 12px;
    }
    
    .order-card {
        padding: 16px;
    }
    
    .interactive-card:hover {
        transform: none;
    }
}

@media (max-width: 768px) {
    .chart-container {
        height: 250px;
    }
    
    .dashboard-card {
        padding: 20px;
    }
    
    .pos-product-card {
        padding: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Modal and Authentication Improvements */
.max-h-90vh {
    max-height: 90vh;
}

.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

/* Mobile Modal Improvements */
@media (max-width: 640px) {
    .modal-content {
        max-height: 85vh;
        margin: 0.5rem;
    }
    
    #loginModal .bg-white,
    #registerModal .bg-white {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
    
    .dashboard-card {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* Dark Mode Support (future feature) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles will be added here in future updates */
}

/* Custom Utilities */
.text-gradient {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* POS Specific Styles */
.pos-button {
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.pos-button:hover {
    transform: scale(1.02);
    border-color: #f97316;
}

.pos-button:active {
    transform: scale(0.98);
}

/* Kitchen Display Styles */
.order-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #f97316;
    transition: all 0.3s ease;
}

.order-card.priority-high {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.order-card.priority-medium {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

/* Chart Containers */
.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

@media (max-width: 768px) {
    .chart-container {
        height: 300px;
    }
}

/* Emoji Background */
.emoji-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.emoji-background__emoji {
    position: absolute;
    font-size: clamp(2.5rem, 4vw, 4.5rem);
    opacity: 0.12;
    animation: emojiFloat 12s ease-in-out infinite;
}

.emoji-background__emoji:nth-child(1) {
    top: 12%;
    left: 8%;
    animation-duration: 14s;
}

.emoji-background__emoji:nth-child(2) {
    top: 18%;
    right: 12%;
    animation-duration: 13s;
    animation-delay: -2s;
}

.emoji-background__emoji:nth-child(3) {
    top: 40%;
    left: 20%;
    animation-duration: 16s;
    animation-delay: -4s;
}

.emoji-background__emoji:nth-child(4) {
    top: 55%;
    right: 18%;
    animation-duration: 12s;
    animation-delay: -1s;
}

.emoji-background__emoji:nth-child(5) {
    bottom: 18%;
    left: 10%;
    animation-duration: 18s;
    animation-delay: -6s;
}

.emoji-background__emoji:nth-child(6) {
    bottom: 28%;
    right: 24%;
    animation-duration: 15s;
    animation-delay: -3s;
}

.emoji-background__emoji:nth-child(7) {
    bottom: 12%;
    left: 35%;
    animation-duration: 20s;
    animation-delay: -5s;
}

.emoji-background__emoji:nth-child(8) {
    bottom: 8%;
    right: 8%;
    animation-duration: 17s;
    animation-delay: -7s;
}

@keyframes emojiFloat {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(0, -25px, 0) scale(1.05);
    }
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
}

/* Hero Slider */
.hero-slider {
    position: relative;
    border-radius: 36px;
    overflow: hidden;
    min-height: 420px;
    background: #111827;
    box-shadow: 0 35px 65px -20px rgba(249, 115, 22, 0.35);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 0.8s ease;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background-size: cover;
    background-position: center;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    position: absolute;
}

.hero-slide__media {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(15, 23, 42, 0.85), rgba(249, 115, 22, 0.65));
}

.hero-slide__content {
    position: relative;
    z-index: 2;
    padding: 4rem;
    color: #fff;
    max-width: 520px;
}

.hero-slide__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.75rem;
}

.hero-slide__title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-slide__description {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.5rem;
}

.hero-slide__cta {
    background: #f97316;
    color: #fff;
    font-weight: 600;
    padding: 0.85rem 1.75rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.35);
}

.hero-slide__cta:hover {
    transform: translateY(-2px);
    background: #ea580c;
}

.hero-slide__cta--secondary {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: none;
}

.hero-slide__cta--outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: none;
}

.hero-slide__link {
    font-weight: 600;
    color: #fff;
    display: inline-flex;
    align-items: center;
    opacity: 0.9;
}

.hero-slide__link:hover {
    opacity: 1;
}

.hero-slider__control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: none;
    background: rgba(15, 23, 42, 0.65);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: background 0.2s ease;
}

.hero-slider__control:hover {
    background: rgba(15, 23, 42, 0.85);
}

.hero-slider__control--left {
    left: 1rem;
}

.hero-slider__control--right {
    right: 1rem;
}

.hero-slider__dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 3;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    background: #fff;
    transform: scale(1.15);
}

@media (max-width: 768px) {
    .hero-slide__content {
        padding: 2rem;
        max-width: 100%;
    }

    .hero-slider__control {
        width: 42px;
        height: 42px;
    }
}

/* Star Rating Input */
.star-rating-input {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 0.35rem;
}

.star-rating-input input {
    display: none;
}

.star-rating-input label {
    font-size: 1.5rem;
    color: #d1d5db;
    cursor: pointer;
    transition: transform 0.15s ease, color 0.15s ease;
}

.star-rating-input label:hover,
.star-rating-input label:hover ~ label {
    color: #fbbf24;
    transform: translateY(-2px) scale(1.05);
}

.star-rating-input input:checked ~ label {
    color: #fbbf24;
}

.star-rating-input input:checked + label {
    animation: starPop 0.2s ease;
}

@keyframes starPop {
    0%   { transform: scale(0.8); }
    60%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}
