/* ========== ESTILOS DE INTERCAMBIOS ========== */

.intercambios-wrapper,
.mis-intercambios-wrapper {
    background: linear-gradient(to bottom, #e8e8e8 0%, #d0d0d0 100%);
    border-radius: 30px;
    padding: 25px 20px 100px 20px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    min-height: calc(100vh - 240px);
}

/* ========== HEADER ========== */

.intercambios-header,
.mis-intercambios-header {
    text-align: center;
    margin-bottom: 25px;
    background: white;
    padding: 25px 20px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-icon {
    font-size: 50px;
    margin-bottom: 10px;
}

.intercambios-title,
.mis-intercambios-title {
    font-size: 24px;
    color: #1a1a1a;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.intercambios-subtitle,
.mis-intercambios-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

/* ========== MENSAJE DE SERVICIO DESHABILITADO ========== */

.servicio-deshabilitado {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.servicio-deshabilitado-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.servicio-deshabilitado h2 {
    font-size: 20px;
    color: #1a1a1a;
    margin-bottom: 12px;
    font-weight: 700;
}

.servicio-deshabilitado p {
    font-size: 15px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 25px;
}

.btn-habilitar-servicio {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.3);
}

.btn-habilitar-servicio:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 222, 128, 0.4);
}

/* ========== LISTA DE USUARIOS ========== */

.usuarios-lista {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.usuario-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.usuario-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.usuario-card:active {
    transform: translateY(0);
}

.usuario-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

.usuario-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.usuario-info {
    flex: 1;
}

.usuario-nombre {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 4px 0;
}

.usuario-productos-count {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.usuario-productos {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.producto-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 10px;
}

.producto-nombre-emoji {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.producto-emoji {
    font-size: 20px;
}

.producto-nombre-text {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.producto-estado-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.estado-punto {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.estado-baja-badge {
    background: #d1fae5;
    color: #065f46;
}

.estado-baja-badge .estado-punto {
    background: #22c55e;
}

.estado-avanzada-badge {
    background: #fef3c7;
    color: #92400e;
}

.estado-avanzada-badge .estado-punto {
    background: #fbbf24;
}

.estado-muy-avanzada-badge {
    background: #fee2e2;
    color: #991b1b;
}

.estado-muy-avanzada-badge .estado-punto {
    background: #ef4444;
}

/* ========== BOTÓN MIS INTERCAMBIOS (FIJO) ========== */

.btn-mis-intercambios-container {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 30px);
    max-width: 570px;
    z-index: 50;
}

.btn-mis-intercambios {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-mis-intercambios:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.5);
}

.btn-mis-intercambios:active {
    transform: translateY(0);
}

/* ========== MODAL DE USUARIO ========== */

.modal-overlay-intercambio {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-usuario-content {
    background: white;
    border-radius: 25px;
    padding: 30px 25px;
    max-width: 450px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideUp 0.3s ease;
}

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

.modal-usuario-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
}

.modal-usuario-avatar {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    margin: 0 auto 15px;
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.3);
}

.modal-usuario-nombre {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.modal-contacto-section {
    background: #f0f9ff;
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 20px;
    border-left: 4px solid #3b82f6;
}

.modal-contacto-label {
    font-size: 12px;
    font-weight: 600;
    color: #1e40af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.modal-contacto-numero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.numero-texto {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: 0.5px;
}

.btn-copiar-numero {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-copiar-numero:hover {
    background: #2563eb;
    transform: scale(1.05);
}

.btn-copiar-numero:active {
    transform: scale(0.95);
}

.modal-productos-section {
    margin-bottom: 20px;
}

.modal-productos-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-productos-lista {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
}

.btn-cerrar-modal {
    flex: 1;
    padding: 14px 20px;
    background: #94a3b8;
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cerrar-modal:hover {
    background: #64748b;
}

/* ========== MIS INTERCAMBIOS - LISTA DE PRODUCTOS ========== */

.productos-disponibles-lista {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.producto-intercambio-item {
    background: white;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.producto-intercambio-item.seleccionado {
    border: 2px solid #4ade80;
    box-shadow: 0 4px 16px rgba(74, 222, 128, 0.3);
}

.producto-checkbox-header {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.custom-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.custom-checkbox.checked {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    border-color: #22c55e;
}

.custom-checkbox.checked::after {
    content: "✓";
    color: white;
    font-weight: bold;
    font-size: 16px;
}

.producto-checkbox-info {
    flex: 1;
}

.producto-checkbox-nombre {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.producto-checkbox-estado {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

/* ========== BOTONES MIS INTERCAMBIOS ========== */

.mis-intercambios-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.btn-guardar-intercambios,
.btn-volver-intercambios {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-guardar-intercambios {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: white;
}

.btn-guardar-intercambios:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 222, 128, 0.4);
}

.btn-volver-intercambios {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    color: white;
}

.btn-volver-intercambios:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(148, 163, 184, 0.4);
}

/* ========== EMPTY STATE ========== */

.empty-state-intercambios {
    background: white;
    border-radius: 20px;
    padding: 60px 30px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state-intercambios p {
    font-size: 16px;
    color: #1a1a1a;
    margin-bottom: 8px;
    font-weight: 600;
}

.empty-subtitle {
    font-size: 14px !important;
    color: #64748b !important;
    margin-bottom: 25px !important;
}

.btn-ir-camara {
    padding: 14px 28px;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-ir-camara:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.4);
}

/* ========== TOAST ========== */

.toast-intercambio {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 10px 30px rgba(74, 222, 128, 0.5);
    z-index: 10000;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast-intercambio.show {
    transform: translateX(-50%) translateY(0);
}

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

@media (max-width: 480px) {
    .intercambios-wrapper,
    .mis-intercambios-wrapper {
        padding: 20px 15px 100px 15px;
    }

    .usuario-card {
        padding: 16px;
    }

    .usuario-nombre {
        font-size: 16px;
    }

    .modal-usuario-content {
        padding: 25px 20px;
    }

    .btn-mis-intercambios-container {
        width: calc(100% - 20px);
    }
}