@use '../../../../shared/styles/panel-shared' as panel;

.email-recipient-creator {
  display: flex;
  flex-direction: column;
  min-width: 600px;

  @media (max-width: 640px) {
    min-width: auto;
    width: 100%;
  }
}

.panel-header {
  @include panel.panel-header;
}

.form-container {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-top: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  max-height: 60vh;
  overflow-y: auto;

  @media (max-width: 480px) {
    padding: 1rem;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;

  &.highlight-group {
    padding: 0.875rem;
  }

  &.checkbox-group {
    padding: 0.75rem 0.875rem;
  }

  @media (max-width: 480px) {
    gap: 0.375rem;

    &.highlight-group {
      padding: 0.625rem;
    }

    &.checkbox-group {
      padding: 0.5rem 0.625rem;
    }
  }
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-color);

  .label-icon {
    color: var(--primary-color);
  }

  .required-indicator {
    color: var(--p-red-500);
    margin-left: 0.125rem;
  }

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

.input-wrapper {
  position: relative;

  .input-full {
    width: 100%;
    padding-right: 2.5rem;
    box-sizing: border-box;
  }

  .input-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    pointer-events: none;

    &.success {
      color: var(--p-green-500);
    }
  }
}

.input-full {
  width: 100%;
  box-sizing: border-box;
}

.field-error {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;

  &::before {
    content: '⚠';
    font-size: 0.875rem;
  }
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;

  .checkbox-label {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    cursor: pointer;
    flex: 1;

    .checkbox-title {
      font-size: 0.9375rem;
      font-weight: 600;
      color: var(--text-color);
    }

    .checkbox-description {
      font-size: 0.8rem;
      color: var(--text-secondary-color);
    }
  }

  @media (max-width: 480px) {
    gap: 0.5rem;

    .checkbox-label {
      .checkbox-title {
        font-size: 0.875rem;
      }

      .checkbox-description {
        font-size: 0.75rem;
      }
    }
  }
}

.gradient-divider {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--border-color) 20%,
    var(--border-color) 80%,
    transparent
  );
  margin: 1.25rem 0;

  @media (max-width: 480px) {
    margin: 1rem 0;
  }
}

.dialog-footer {
  @include panel.dialog-footer;
  border-top: none;
}

.validation-message {
  @include panel.validation-message;
}

