@import "../variables";

// Avatar Section
.arraysubs-avatar-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;

  h3 {
    margin-bottom: 12px;
    font-size: 1.1em;
  }

  &__preview {
    margin-bottom: 12px;
  }

  &__image {
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e0e0e0;
    display: block;
  }

  &__actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
  }

  &__upload-btn {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;

    &--loading {
      opacity: 0.6;
      pointer-events: none;
    }
  }

  &__remove-btn {
    color: #a00;

    &:hover {
      color: #dc3232;
    }
  }

  &__file-input {
    display: none;
  }

  &__help {
    margin-top: 8px;
    font-size: 0.9em;
    color: #666;
    min-height: 1.2em;

    &--error {
      color: #dc3232;
    }

    &--info {
      color: #0073aa;
    }
  }
}

// Profile Fields
.arraysubs-profile-fields {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;

  h3 {
    margin-bottom: 16px;
    font-size: 1.1em;
  }
}

.arraysubs-profile-field {
  &__help {
    display: block;
    margin-top: 4px;
    font-size: 0.85em;
    color: #666;
  }

  &__checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
  }

  &__upload-wrapper {
    display: block;
  }

  &__current-file {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;

    a {
      color: #0073aa;
    }
  }

  &__remove-file {
    font-size: 0.85em;
    color: #a00;
    cursor: pointer;
    background: none;
    border: none;
    padding: 2px 6px;

    &:hover {
      color: #dc3232;
    }
  }

  &--upload {
    .woocommerce-Input--file {
      max-width: 100%;
    }
  }
}
// Admin user-edit avatar
.arraysubs-admin-avatar {
  &__image {
    border-radius: 50%;
    display: block;
    margin-bottom: 8px;
  }

  &__remove-label {
    display: block;
    margin-top: 6px;
  }
}
