/* Estilos para el formulario de pedidos */

/* Estilo principal del formulario */
#ordenar {
    background-color: #1a1a1a;
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    position: relative;
    color: #fff;
    padding-top: 3rem;
    padding-bottom: 4rem;
    min-height: 100vh;
}

#ordenar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 0;
    backdrop-filter: blur(3px);
    opacity: 0.15;
}

#orderForm {
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    animation: fadeIn 0.8s ease-in-out;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(220, 53, 69, 0.25);
    border: 2px solid #FFD700;
}

/* Estilo para los campos de entrada */
.form-control, .form-select {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-radius: 12px;
    border: 1px solid rgba(220, 53, 69, 0.15);
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.03);
}

.form-control:focus, .form-select:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
    transform: translateY(-3px);
    background-color: #fff;
}

/* Estilo para los elementos del pedido */
.order-item {
    transition: all 0.3s ease;
    border-radius: 16px;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(220, 53, 69, 0.15);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.order-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.3);
}

.order-item::before {
    content: '';
    position: absolute;
    top: -10px;
    right: -10px;
    width: 80px;
    height: 80px;
    background-image: url('../img/PILON MOFONGO.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    opacity: 0.1;
    z-index: 0;
}

/* Estilo para los botones de ubicación */
.location-btn {
    margin: 0.5rem;
    min-width: 150px;
    border-radius: 30px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 500;
    border: 2px solid #dc3545;
    background-color: #FFD700;
    color: #dc3545;
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.2);
}

.location-btn:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.location-btn i {
    font-size: 1.2rem;
    margin-left: 5px;
    vertical-align: middle;
}

/* Estilo para el resumen del pedido */
#orderForm .card.bg-light {
    transition: all 0.3s ease;
    border-radius: 12px;
    border: none;
    background: linear-gradient(145deg, #ffffff, #f0f0f0) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

#orderForm .card.bg-light:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 0, 0.15);
}

#orderForm .card.bg-light .card-body {
    padding: 1.5rem;
}

/* Estilo para el título de la sección */
#ordenar h2 {
    color: #FFD700;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    font-weight: 800;
    text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.15);
    font-size: 2.5rem;
    letter-spacing: -0.5px;
}

#ordenar h2:after {
    content: '';
    position: absolute;
    width: 70%;
    height: 6px;
    background: linear-gradient(90deg, #FFD700, #FFC000);
    bottom: -15px;
    left: 15%;
    border-radius: 6px;
    box-shadow: 0 3px 8px rgba(255, 215, 0, 0.3);
}

#ordenar h2:before {
    /* Se ha eliminado el ícono de hamburguesa flotante */
    content: none; /* Elimina completamente el contenido */
    display: none; /* Asegura que el elemento no se muestre */
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Estilo para los mensajes de validación */
.invalid-feedback {
    font-size: 0.85rem;
    color: #ff4136;
}

/* Estilo para el botón de agregar producto */
#addItemBtn {
    padding: 0.75rem 1.75rem;
    font-weight: 600;
    background: #FFD700;
    border: 2px solid #dc3545;
    color: #dc3545;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#addItemBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.4);
}

#addItemBtn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.4s ease;
}

#addItemBtn:hover::before {
    left: 100%;
}

/* Estilo para los campos requeridos */
.form-label.required:after {
    content: ' *';
    color: #ff4136;
}

/* Estilos para la previsualización de factura en el formulario */
#invoicePreview {
    margin-top: 2rem;
    margin-bottom: 3rem;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: center top;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    overflow: hidden;
    position: sticky;
    top: 20px;
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    border: 2px solid #FFD700;
}

#invoicePreview:not(.d-none) {
    animation: scaleIn 0.5s forwards;
}

#invoicePreview .card-header {
    border-radius: 12px 12px 0 0;
}

#invoicePreview .badge.bg-success {
    animation: pulse 2s infinite;
    font-weight: 500;
    padding: 0.5em 0.8em;
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .location-btn {
        width: calc(50% - 1rem);
        font-size: 0.9rem;
        padding: 0.5rem;
    }
    
    #orderForm .card-body {
        padding: 1.5rem;
    }
    
    #invoicePreview {
        margin-top: 1.5rem;
        margin-bottom: 2rem;
        position: relative;
        top: 0;
        height: auto;
    }
}

@media (max-width: 576px) {
    .location-btn {
        width: 100%;
        margin: 0.25rem 0;
    }
    
    #orderForm .card-body {
        padding: 1rem;
    }
    
    .order-item {
        padding: 0.75rem !important;
    }
    
    #invoicePreview .card-body {
        padding: 1rem;
    }
}
