/* Estilos Frontend Galorina */

/* Contenedores principales */
.galorina-visualizador,
.galorina-mis-pedidos,
.package-tracking-client,
.galorina-tracking-public {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Tablas */
.galorina-table-container {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.galorina-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 14px;
}

.galorina-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #27276F;
    border-bottom: 2px solid #046931;
}

.galorina-table td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.galorina-table tr:hover {
    background: #f8f9fa;
}

/* Estados */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

.status-badge-large {
    font-size: 18px;
    font-weight: bold;
    padding: 15px 30px;
    border-radius: 40px;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Colores de estados (heredados de Utils) */
.status-registrado { background: #e3f2fd; color: #1565c0; }
.status-madrid { background: #e8eaf6; color: #283593; }
.status-frankfurt { background: #fff8e1; color: #b26a00; }
.status-nigeria { background: #e0f2f1; color: #00695c; }
.status-addis_abeba { background: #f3e5f5; color: #7b1fa2; }
.status-douala { background: #fff3e0; color: #e65100; }
.status-en_almacen { background: #fff3e0; color: #ef6c00; }
.status-embarcado { background: #e1f5fe; color: #0277bd; }
.status-llegado_guinea { background: #e8f5e8; color: #2e7d32; }
.status-en_transito { background: #fff8e1; color: #ff8f00; }
.status-en_reparto { background: #fff3e0; color: #ef6c00; }
.status-entregado { background: #e8f5e8; color: #2e7d32; }
.status-incidencia { background: #ffebee; color: #c62828; }
.status-solicitud_pago { background: #e1f5fe; color: #0277bd; }
.status-pagado { background: #e8f5e8; color: #2e7d32; }

/* Botones */
.view-details-btn {
    background: #046931;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.view-details-btn:hover {
    background: #034d28;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(4,105,49,0.3);
}

.btn-solicitar {
    background: #2196F3;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-solicitar:hover {
    background: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(33,150,243,0.3);
}

.btn-pagar {
    background: #FF9800;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-pagar:hover {
    background: #F57C00;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(255,152,0,0.3);
}

/* Modal */
.tracking-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tracking-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.tracking-modal-close {
    color: #27276F;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.tracking-modal-close:hover {
    color: #046931;
    background: #f0f0f0;
}

/* Mensajes */
.message-success {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #2e7d32;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.message-error {
    background: #ffebee;
    color: #c62828;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #c62828;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Resumen de pago */
.resumen-pago {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 30px;
    border-radius: 12px;
    margin-top: 30px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.total-box {
    background: #046931;
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(4,105,49,0.2);
}

.acciones-pago {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: center;
}

/* Galería de imágenes */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.gallery-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    background: white;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

/* Tracking público */
.tracking-form-box {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    margin: 40px 0;
}

.form-input {
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    width: 60%;
    transition: all 0.3s;
}

.form-input:focus {
    border-color: #046931;
    outline: none;
    box-shadow: 0 0 0 3px rgba(4,105,49,0.1);
}

.form-button {
    background: #046931;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.3s;
}

.form-button:hover {
    background: #034d28;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(4,105,49,0.2);
}

.input-with-button {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.results-code {
    background: #046931;
    color: white;
    padding: 12px 30px;
    border-radius: 40px;
    display: inline-block;
    font-weight: 600;
    font-size: 1.3em;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.info-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid #046931;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.info-card h4 {
    color: #046931;
    margin-top: 0;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* Historial de tracking */
.tracking-history {
    margin-top: 30px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
}

.history-list li {
    padding: 10px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.history-list li:last-child {
    border-bottom: none;
}

.history-date {
    background: #046931;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.history-status {
    font-weight: 600;
    color: #27276F;
}

.history-city {
    color: #666;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .galorina-table th,
    .galorina-table td {
        padding: 10px;
        font-size: 13px;
    }
    
    .tracking-modal-content {
        width: 95%;
        margin: 2% auto;
        padding: 20px;
    }
    
    .acciones-pago {
        flex-direction: column;
    }
    
    .btn-solicitar,
    .btn-pagar {
        width: 100%;
    }
    
    .form-input {
        width: 100%;
    }
    
    .form-button {
        width: 100%;
        margin-left: 0;
    }
    
    .input-with-button {
        flex-direction: column;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .history-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .galorina-table {
        font-size: 12px;
    }
    
    .view-details-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .total-box {
        font-size: 18px;
        padding: 15px;
    }
}
/* Botón Pagar con Tarjeta (Stripe) */
.btn-stripe {
    background: linear-gradient(135deg, #635BFF 0%, #4F46E5 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-stripe:hover {
    background: linear-gradient(135deg, #4F46E5 0%, #3730A3 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 91, 255, 0.4);
}

/* Modal de Pago Stripe */
.stripe-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s;
}

.stripe-modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s;
}

.stripe-modal-close {
    color: #666;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.stripe-modal-close:hover {
    color: #c62828;
    background: #ffebee;
}

.stripe-modal-content h3 {
    color: #27276F;
    margin-top: 0;
    margin-bottom: 20px;
    padding-right: 30px;
}

.stripe-amount-display {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border-left: 4px solid #635BFF;
}

.stripe-amount-display p {
    margin: 5px 0;
    color: #333;
}

.stripe-amount-display strong {
    color: #27276F;
}

#stripe-amount {
    font-size: 1.4em;
    color: #046931;
    font-weight: 700;
}

#card-element-container {
    margin-bottom: 20px;
}

#card-element-container label {
    display: block;
    margin-bottom: 8px;
    color: #27276F;
    font-weight: 500;
}

#card-element {
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.3s;
}

#card-element.StripeElement--focus {
    border-color: #635BFF;
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.1);
}

#card-element.StripeElement--invalid {
    border-color: #c62828;
    background: #ffebee;
}

#card-errors {
    color: #c62828;
    font-size: 13px;
    margin-top: 8px;
    display: none;
}

#card-errors:not(:empty) {
    display: block;
}

.btn-stripe-submit {
    width: 100%;
    background: linear-gradient(135deg, #635BFF 0%, #4F46E5 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-stripe-submit:hover {
    background: linear-gradient(135deg, #4F46E5 0%, #3730A3 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 91, 255, 0.4);
}

.btn-stripe-submit:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Mensajes de éxito y error */
#stripe-success-message,
#stripe-error-message {
    text-align: center;
    padding: 30px 20px;
}

.success-icon,
.error-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

#stripe-success-message h4 {
    color: #2e7d32;
    margin-bottom: 10px;
}

#stripe-error-message h4 {
    color: #c62828;
    margin-bottom: 10px;
}

.btn-cerrar-modal,
.btn-reintentar {
    background: #046931;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
}

.btn-cerrar-modal:hover,
.btn-reintentar:hover {
    background: #034d28;
}

.btn-reintentar {
    background: #FF9800;
}

.btn-reintentar:hover {
    background: #F57C00;
}

/* Responsive para Stripe */
@media (max-width: 768px) {
    .stripe-modal-content {
        width: 95%;
        margin: 20% auto;
        padding: 20px;
    }
    
    .btn-stripe {
        width: 100%;
        justify-content: center;
    }
    
    .acciones-pago {
        flex-wrap: wrap;
    }
}

/* Item resumen estilo mejorado */
.item-resumen {
    padding: 10px 15px;
    background: white;
    border-radius: 6px;
    margin: 8px 0;
    border-left: 3px solid #046931;
    font-size: 14px;
}

/* Botón Solicitar Consolidación */
.btn-consolidar {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-consolidar:hover {
    background: linear-gradient(135deg, #F57C00 0%, #E65100 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

.acciones-consolidacion {
    text-align: center;
}

.form-consolidacion {
    display: inline-block;
    width: 100%;
}

/* Responsive para consolidación */
@media (max-width: 768px) {
    .acciones-consolidacion {
        margin-top: 15px;
    }
    
    .btn-consolidar {
        font-size: 13px;
        padding: 10px 20px;
    }
}
