// GiftFlow Campaign Tracking (inherits --gfh-* from .giftflow-dashboard-view)
.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: var(--gfh-bg, #fff);
    padding: 1rem;
    border-radius: var(--gfh-radius-sm, 6px);
    border: 1px solid var(--gfh-line, #dcdcde);
  }

  &__title-link {
    text-decoration: none;
    display: block;
    margin-bottom: 0.25rem;
    border-bottom: none !important;
    color: var(--gfh-theme, #2271b1);
    transition: color var(--gfh-dur, 0.2s) var(--gfh-ease, ease);

    &:hover {
      color: var(--gfh-theme-2, #135e96);
    }
  }

  &__title {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    color: var(--gfh-text, #1d2327);
    margin-bottom: 0.5rem;
  }

  &__excerpt {
    font-size: 0.95rem;
    color: var(--gfh-text-muted, #646970);
    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: var(--gfh-text-secondary, #50575e);
    }
  }

  &__status {
    font-weight: 600;

    &--closed {
      color: #d63638;
    }

    &--active,
    &--open {
      color: var(--gfh-chart-donations, #007017);
    }

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

  &__progress-bar {
    width: 100%;
    background: var(--gfh-bg-muted, #f0f0f1);
    border-radius: 3px;
    height: 6px;
    margin-bottom: 0.5rem;
    overflow: hidden;
  }

  &__progress-fill {
    height: 100%;
    background: linear-gradient(
      90deg,
      var(--gfh-theme, #2271b1) 0%,
      var(--gfh-theme-2, #135e96) 100%
    );
    border-radius: 3px;
    transition: width 0.5s var(--gfh-ease-out, ease);
  }

  &__meta {
    font-size: 0.85rem;
    color: var(--gfh-text-muted, #646970);
    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: var(--gfh-theme, #2271b1);
  }

  &__date {
    strong {
      font-weight: 600;
      color: var(--gfh-text-secondary, #50575e);
    }
  }

  // Loading and error states
  &__loading {
    text-align: center;
    padding: 2rem;
    color: var(--gfh-text-muted, #646970);
    font-style: italic;
  }

  &__error {
    text-align: center;
    padding: 1rem 1.25rem;
    color: #d63638;
    background: #fcf0f1;
    border: 1px solid #f0b0b5;
    border-radius: var(--gfh-radius-sm, 6px);
  }

  &__modal-state {
    padding: 1rem 1.25rem;
    border-radius: var(--gfh-radius-sm, 6px);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 1rem;

    &--loading {
      background: var(--gfh-bg-soft, #f6f7f7);
      border: 1px solid var(--gfh-line, #dcdcde);
      color: var(--gfh-text-muted, #646970);
    }

    &--error {
      background: #fcf0f1;
      border: 1px solid #f0b0b5;
      color: #d63638;
    }
  }

  &__auto-message {
    padding: 10px 12px;
    margin-bottom: 0.75rem;
    font-size: 12px;
    line-height: 1.45;
    color: var(--gfh-text-secondary, #50575e);
    background: var(--gfh-bg-soft, #f6f7f7);
    border: 1px solid var(--gfh-line, #dcdcde);
    border-radius: var(--gfh-radius-sm, 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 var(--gfh-line, #dcdcde);
    border-radius: var(--gfh-radius, 8px);
    overflow: hidden;
    background: var(--gfh-bg, #fff);
    transition:
      border-color var(--gfh-dur, 0.2s) var(--gfh-ease, ease),
      box-shadow var(--gfh-dur, 0.2s) var(--gfh-ease, ease);
    box-shadow: var(--gfh-shade, 0 1px 3px rgba(0, 0, 0, 0.06));

    &:hover {
      border-color: var(--gfh-theme, #2271b1);
    }

    &:focus-within {
      border-color: var(--gfh-theme, #2271b1);
      box-shadow: 0 0 0 1px var(--gfh-theme, #2271b1);
    }
  }

  &__multiselect {
    width: 100%;
    min-height: 340px !important;
    border: none;
    outline: none;
    padding: 12px;
    font-size: 1rem;
    background: transparent;
    color: var(--gfh-text, #1d2327);
    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 var(--gfh-line, #dcdcde);
      background: var(--gfh-bg, #fff);
      color: var(--gfh-text, #1d2327);
      transition: background-color var(--gfh-dur, 0.2s) var(--gfh-ease, ease);

      &:hover {
        background: var(--gfh-bg-soft, #f6f7f7);
      }

      &:checked {
        background: var(--gfh-theme, #2271b1);
        color: #fff;
      }

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

  &__help-text {
    font-size: 0.92rem;
    color: var(--gfh-text-muted, #646970);
    margin-top: 10px;
    line-height: 1.4;
  }

  &__key {
    background: var(--gfh-bg-muted, #f0f0f1);
    border: 1px solid var(--gfh-line, #dcdcde);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 0.92em;
    font-weight: 600;
    color: var(--gfh-text-secondary, #50575e);
  }

  @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;
    }
  }
}
