.mi-plugin-wrapper {
  font-family: var(--e-global-typography-text-font-family, inherit) !important;
  font-weight: var(--e-global-typography-text-font-weight, inherit) !important;
  line-height: var(--e-global-typography-text-line-height, inherit) !important;
  color: var(--e-global-color-text, inherit) !important;
}



/* --- General --- */
.hidden {
  display: none;
}

.mi-plugin-wrapper {
  display: flex;
  justify-content: center;
  padding: 0;
  width: 100%;
  max-width: 100% !important;
}

.mi-plugin-card {
  width: 100%;
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  font-family: Inter, system-ui;
}

/* --- Header --- */
.title {
  display: flex;
  gap: 2rem;
}

.title h2 {
    font-weight: 600 !important;
    color: #0b005a !important;
    font-size: 32px !important;
}

.img-sky {
  width: 50px;
}

/* --- Textarea --- */
textarea {
  width: 98%;
  min-height: 130px;
  border-radius: 10px;
  border: 1px solid #e6eef7;
  padding: 12px;
  font-size: 14px;
  resize: none;
  background-color: #f9fafb;
  color: #6b7280;
  margin-top: 15px;
}

/* --- Buttons --- */
.mi-plugin-actions {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.btn-primary {
  background: linear-gradient(135deg, #5233ea, #6f4ef6);
  color: #ffffff !important;
  padding: 12px 22px;
  border: none !important;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;
  transition: all 0.2s ease-in-out;
  width: 100% !important;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #6f4ef6, #8c6ffb);
  box-shadow: 0 6px 18px rgba(82, 51, 234, 0.4);
  transform: translateY(-2px);
  width: 100%;
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(82, 51, 234, 0.25);
  width: 100%;
}

.btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(82, 51, 234, 0.4);
  width: 100%;
}

/* --- Search --- */
.search-wrapper {
  position: relative;
  width: 100%;
  max-width: 300px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
  font-size: 16px;
  pointer-events: none;
  margin-top: -4px;
}

.filter {
  width: 100%;
  padding: 8px 35px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.filter:focus {
  outline: none;
  border-color: #5233ea;
  box-shadow: 0 0 5px rgba(0, 154, 68, 0.3);
}

.clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #888;
  font-size: 16px;
  cursor: pointer;
  display: none;
}

.clear-btn:hover {
  color: #5233ea;
}

/* --- Grid --- */
.mi-plugin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

/* --- Carrier Cards --- */
.carrier-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 2px solid #eee;
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.carrier-card:hover {
  border-color: #5233ea;
  box-shadow: 0 0 6px rgba(82, 51, 234, 0.3);
  transform: translateY(-2px);
}

.carrier-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin-bottom: 6px;
}

.carrier-selected {
  display: flex;
  flex-direction: column;
  /* Coloca la imagen arriba y el nombre abajo */
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
}

.carrier-logo-large {
  width: 60px;
  height: 60px;
  object-fit: contain;
  /* Asegura que la imagen mantenga proporción */
  border-radius: 8px;
  background-color: #fff;
  padding: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.carrier-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  margin-top: 2px;
}


/* --- Detection Result --- */
.detection-result {
  margin-top: 12px;
  padding: 10px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 8px;
  color: #5233ea;
  font-weight: 600;
  display: none;
}

#tracking-loader {
  text-align: center;
  margin: 1rem 0;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #ccc;
  border-top-color: #5233ea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

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


.tracking-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tracking-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.tracking-header h3 {
  font-size: 1.1rem;
  margin: 0;
}

.tracking-header p {
  font-size: 0.9rem;
  color: #555;
}

.carrier-info .carrier-name {
  color: #0073aa;
  font-weight: bold;
}

.timeline {
  position: relative;
  padding-left: 20px;
  border-left: 2px solid #5233ea;
}

.timeline-item {
  position: relative;
  margin-bottom: 20px;
  padding-left: 10px;
}

.timeline-marker {
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  background-color: #5233ea;
  border-radius: 50%;
  border: 2px solid #fff;
}

.timeline-content {
  margin-left: 10px;
}

.timeline-date {
  color: #5233ea;
  font-weight: bold;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.timeline-location {
  font-weight: 600;
  color: #000;
  font-size: 0.9rem;
  margin-bottom: 3px;
}

.timeline-status {
  color: #333;
  font-size: 0.9rem;
}


/* --- Responsive --- */
@media (max-width: 880px) {
  .mi-plugin-card {
    padding: 16px;
    max-width: 720px;
  }

  .mi-plugin-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .btn-primary {
    padding: 10px 14px;
  }
}

@media (max-width: 520px) {
  .mi-plugin-wrapper {
    padding: 12px;
  }

  .mi-plugin-card {
    border-radius: 12px;
    padding: 14px;
    width: 100%;
  }

  .mi-plugin-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
  }

  textarea {
    min-height: 120px;
    padding: 12px;
  }
}

/* --- Accessibility --- */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}