// GiftFlow Campaign Tracking Component
.giftflow-campaigns-list {
  &__ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  &__item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    // border-bottom: 1px solid #dddddd;
    // padding-bottom: 1.5rem;

    &:last-child {
      margin-bottom: 0;
      border-bottom: none;
      padding-bottom: 0;
    }
  }

  &__content {
    flex: 1;
    width: 100%;

    background: #ffffff;
    padding: 1rem;
    border-radius: 0.5rem;
    border: solid 1px #eee;
  }

  &__title-link {
    text-decoration: none;
    display: block;
    margin-bottom: 0.25rem;
    border-bottom: none !important;
  }

  &__title {
    margin: 0 0 0.25rem 0;
    // font-weight: 600;
    font-size: .9rem;
    // line-height: 1.5;
    color: inherit;
    margin-bottom: .5rem;
  }

  &__excerpt {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    line-height: 1.4;

    p {
      margin: 0;
    }
  }

  &__stats {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    margin-top: .5rem;

    @media (max-width: 480px) {
      gap: 1rem;
      font-size: 0.875rem;
    }
  }

  &__stat {
    strong {
      font-weight: 600;
      color: #374151;
    }
  }

  &__status {
    font-weight: 500;

    &--closed {
      color: #ef4444;
    }

    &--active,
    &--open {
      color: #22c55e;
    }

    &--draft {
      color: #f59e0b;
    }
  }

  &__progress-bar {
    width: 100%;
    background: #f1f5f9;
    border-radius: 2px;
    height: 6px;
    margin-bottom: 0.5rem;
    overflow: hidden;
  }

  &__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #4ade80);
    border-radius: 2px;
    transition: width 0.5s ease;
  }

  &__meta {
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;

    @media (max-width: 480px) {
      font-size: 0.8rem;
      gap: 0.75rem;
    }
  }

  &__percentage {
    font-weight: 600;
    color: #22c55e;
  }

  &__date {
    strong {
      font-weight: 600;
      color: #374151;
    }
  }

  // Loading and error states
  &__loading {
    text-align: center;
    padding: 2rem;
    color: #64748b;
    font-style: italic;
  }

  &__error {
    text-align: center;
    padding: 2rem;
    color: #ef4444;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
  }

  // Responsive adjustments
  @media (max-width: 768px) {
    &__stats {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.5rem;
    }

    &__meta {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.5rem;
    }
  }

  // Settings modal styles
  &__settings-container {
    // background: #f9f9fb;
    // border-radius: 10px;
    // padding: 24px 20px;
    // box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    // margin-top: 8px;
    margin-bottom: 1.5rem;
  }

  &__select-wrapper {
    border: 1px solid #e0e0e7;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: border 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);

    &:hover {
      border-color: #2271b1;
    }

    &:focus-within {
      border-color: #2271b1;
      box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.1);
    }
  }

  &__multiselect {
    width: 100%;
    min-height: 340px !important;
    border: none;
    outline: none;
    padding: 12px;
    font-size: 1rem;
    background: transparent;
    color: #22223b;
    font-family: inherit;
    box-sizing: border-box;
    resize: vertical;
    cursor: pointer;
    max-width: none !important;
    // font-family: 'Courier New', Courier, monospace;

    &:focus {
      outline: none;
    }

    option {
      padding: 8px 10px;
      border-bottom: 1px solid #f0f0f5;
      background: #fff;
      color: #22223b;
      transition: background-color 0.2s ease;

      &:hover {
        background: #f8f9fa;
      }

      &:checked {
        background: #2271b1;
        color: #fff;
      }

      &:last-child {
        border-bottom: none;
      }
    }
  }

  &__help-text {
    font-size: 0.92rem;
    color: #6c6f80;
    margin-top: 10px;
    line-height: 1.4;
  }

  &__key {
    background: #ececf3;
    border-radius: 4px;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 0.92em;
    font-weight: 600;
    color: #374151;
  }

  @media (max-width: 480px) {
    &__item {
      gap: 0.75rem;
      margin-bottom: 1rem;
      padding-bottom: 1rem;
    }

    &__title {
      font-size: 0.9rem;
    }

    &__excerpt {
      font-size: 0.875rem;
    }

    &__stats {
      font-size: 0.8rem;
    }

    &__meta {
      font-size: 0.75rem;
    }

    &__settings-container {
      padding: 16px 12px;
      margin-top: 6px;
    }

    &__multiselect {
      min-height: 120px;
      font-size: 0.9rem;
      padding: 10px;
    }

    &__help-text {
      font-size: 0.85rem;
    }
  }
}
